Class CacheDistributedGetFutureAdapter<K,V>
- java.lang.Object
-
- org.apache.ignite.internal.util.future.GridFutureAdapter<R>
-
- org.apache.ignite.internal.util.future.GridCompoundFuture<T,T>
-
- org.apache.ignite.internal.util.future.GridCompoundIdentityFuture<T>
-
- org.apache.ignite.internal.processors.cache.GridCacheCompoundIdentityFuture<Map<K,V>>
-
- org.apache.ignite.internal.processors.cache.distributed.dht.CacheDistributedGetFutureAdapter<K,V>
-
- All Implemented Interfaces:
Serializable,IgniteInternalFuture<Map<K,V>>,CacheGetFuture,GridCacheFuture<Map<K,V>>,IgniteInClosure<IgniteInternalFuture<Map<K,V>>>
- Direct Known Subclasses:
GridNearGetFuture,GridPartitionedGetFuture
public abstract class CacheDistributedGetFutureAdapter<K,V> extends GridCacheCompoundIdentityFuture<Map<K,V>> implements CacheGetFuture
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classCacheDistributedGetFutureAdapter.AbstractMiniFutureMini-future for get operations.
-
Field Summary
Fields Modifier and Type Field Description protected booleancanRemapFlag indicating that get should be done on a locked topology version.protected GridCacheContext<K,V>cctxContext.protected IgniteUuiddeploymentLdrIdDeployment class loader id which will be used for deserialization of entries on a distributed task.protected booleandeserializeBinaryWhether to deserialize binary objects.static intDFLT_MAX_REMAP_CNTDefault max remap count value.protected IgniteCacheExpiryPolicyexpiryPlcExpiry policy.protected booleanforcePrimaryForce primary flag.protected IgniteUuidfutIdFuture ID.protected Map<AffinityTopologyVersion,Map<Integer,Set<ClusterNode>>>invalidNodesprotected booleankeepCacheObjectsprotected Collection<KeyCacheObject>keysKeys.protected static IgniteLoggerlogLogger.protected static AtomicReference<IgniteLogger>logRefLogger reference.protected booleanneedVerprotected booleanreadThroughRead through flag.protected booleanrecoveryprotected intremapCntRemap count.protected booleanskipValsSkip values flag.protected StringtaskNameTask name.protected booleantrackableTrackable flag.
-
Constructor Summary
Constructors Modifier Constructor Description protectedCacheDistributedGetFutureAdapter(GridCacheContext<K,V> cctx, Collection<KeyCacheObject> keys, boolean readThrough, boolean forcePrimary, String taskName, boolean deserializeBinary, @Nullable IgniteCacheExpiryPolicy expiryPlc, boolean skipVals, boolean needVer, boolean keepCacheObjects, boolean recovery)
-
Method Summary
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheCompoundIdentityFuture
duration, onDone, startTime
-
Methods inherited from class org.apache.ignite.internal.util.future.GridCompoundFuture
add, apply, cancel, clear, compoundsLockedExclusively, compoundsReadLock, compoundsReadUnlock, future, futures, futuresCountNoLock, hasFutures, hasPending, ignoreFailure, initialized, logDebug, logError, markInitialized, processFailure
-
Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter
chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, listen, logger, onCancelled, onDone, onDone, onDone, onDone, reset, result
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.IgniteInternalFuture
cancel, chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, listen, result
-
-
-
-
Field Detail
-
logRef
protected static final AtomicReference<IgniteLogger> logRef
Logger reference.
-
log
protected static IgniteLogger log
Logger.
-
DFLT_MAX_REMAP_CNT
public static final int DFLT_MAX_REMAP_CNT
Default max remap count value.- See Also:
- Constant Field Values
-
cctx
protected final GridCacheContext<K,V> cctx
Context.
-
keys
protected Collection<KeyCacheObject> keys
Keys.
-
readThrough
protected boolean readThrough
Read through flag.
-
forcePrimary
protected boolean forcePrimary
Force primary flag.
-
futId
protected IgniteUuid futId
Future ID.
-
trackable
protected boolean trackable
Trackable flag.
-
remapCnt
protected volatile int remapCnt
Remap count.
-
taskName
protected String taskName
Task name.
-
deserializeBinary
protected boolean deserializeBinary
Whether to deserialize binary objects.
-
skipVals
protected boolean skipVals
Skip values flag.
-
expiryPlc
protected IgniteCacheExpiryPolicy expiryPlc
Expiry policy.
-
canRemap
protected boolean canRemap
Flag indicating that get should be done on a locked topology version.
-
needVer
protected final boolean needVer
-
keepCacheObjects
protected final boolean keepCacheObjects
-
recovery
protected final boolean recovery
-
deploymentLdrId
@GridToStringExclude protected final IgniteUuid deploymentLdrId
Deployment class loader id which will be used for deserialization of entries on a distributed task.
-
invalidNodes
protected Map<AffinityTopologyVersion,Map<Integer,Set<ClusterNode>>> invalidNodes
-
-
Constructor Detail
-
CacheDistributedGetFutureAdapter
protected CacheDistributedGetFutureAdapter(GridCacheContext<K,V> cctx, Collection<KeyCacheObject> keys, boolean readThrough, boolean forcePrimary, String taskName, boolean deserializeBinary, @Nullable @Nullable IgniteCacheExpiryPolicy expiryPlc, boolean skipVals, boolean needVer, boolean keepCacheObjects, boolean recovery)
- Parameters:
cctx- Context.keys- Keys.readThrough- Read through flag.forcePrimary- Iftruethen will force network trip to primary node even if called on backup node.taskName- Task name.deserializeBinary- Deserialize binary flag.expiryPlc- Expiry policy.skipVals- Skip values flag.needVer- Iftruereturns values as tuples containing value and version.keepCacheObjects- Keep cache objects flag.
-
-
Method Detail
-
initLogger
protected void initLogger(Class<?> aclass)
- Parameters:
aclass- Class.
-
trackable
public boolean trackable()
- Specified by:
trackablein interfaceGridCacheFuture<K>- Returns:
Trueif future should be tracked.
-
markNotTrackable
public void markNotTrackable()
Marks this future as non-trackable.- Specified by:
markNotTrackablein interfaceGridCacheFuture<K>
-
futureId
public IgniteUuid futureId()
- Specified by:
futureIdin interfaceGridCacheFuture<K>- Returns:
- Unique identifier for this future.
-
keys
public Collection<KeyCacheObject> keys()
- Returns:
- Keys.
-
partitionOwned
protected final boolean partitionOwned(int part)
- Parameters:
part- Partition.- Returns:
Trueif partition is in owned state.
-
registrateFutureInMvccManager
protected void registrateFutureInMvccManager(GridCacheFuture<?> fut)
- Parameters:
fut- Future.
-
addNodeAsInvalid
protected void addNodeAsInvalid(ClusterNode node, int part, AffinityTopologyVersion topVer)
- Parameters:
node- Cluster node.part- Invalid partition.topVer- Topology version.
-
getInvalidNodes
protected Set<ClusterNode> getInvalidNodes(int part, AffinityTopologyVersion topVer)
- Parameters:
part- Partition.topVer- Topology version.- Returns:
- Set of invalid cluster nodes.
-
checkRetryPermits
protected boolean checkRetryPermits(KeyCacheObject key, ClusterNode node, Map<ClusterNode,LinkedHashMap<KeyCacheObject,Boolean>> missedNodesToKeysMapping)
- Parameters:
key- Key.node- Mapped node.missedNodesToKeysMapping- Full node mapping.
-
onNodeLeft
public boolean onNodeLeft(UUID nodeId)
Callback for when node left.- Specified by:
onNodeLeftin interfaceGridCacheFuture<K>- Parameters:
nodeId- Left node ID.- Returns:
Trueif future cared about this node.
-
onResult
public void onResult(UUID nodeId, GridNearGetResponse res)
- Specified by:
onResultin interfaceCacheGetFuture- Parameters:
nodeId- Node ID.res- Response.
-
serverNotFoundError
protected final ClusterTopologyServerNotFoundException serverNotFoundError(int part, AffinityTopologyVersion topVer)
- Parameters:
part- Partition.topVer- Topology version.- Returns:
- Exception.
-
isMini
protected abstract boolean isMini(IgniteInternalFuture<?> f)
- Parameters:
f- Future.- Returns:
Trueif mini-future.
-
map
protected abstract void map(Collection<KeyCacheObject> keys, Map<ClusterNode,LinkedHashMap<KeyCacheObject,Boolean>> mapped, AffinityTopologyVersion topVer)
- Parameters:
keys- Collection of mapping keys.mapped- Previous mapping.topVer- Topology version.
-
-