Class GridPartitionedSingleGetFuture
- java.lang.Object
-
- org.apache.ignite.internal.util.future.GridFutureAdapter<R>
-
- org.apache.ignite.internal.processors.cache.GridCacheFutureAdapter<Object>
-
- org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture
-
- All Implemented Interfaces:
IgniteDiagnosticAware,IgniteInternalFuture<Object>,CacheGetFuture,GridCacheFuture<Object>
public class GridPartitionedSingleGetFuture extends GridCacheFutureAdapter<Object> implements CacheGetFuture, IgniteDiagnosticAware
-
-
Field Summary
Fields Modifier and Type Field Description protected IgniteUuiddeploymentLdrIdDeployment class loader id which will be used for deserialization of entries on a distributed task.protected static intMAX_REMAP_CNTMaximum number of attempts to remap key to the same primary node.protected static AtomicIntegerFieldUpdater<GridPartitionedSingleGetFuture>REMAP_CNT_UPDRemap count updater.protected intremapCntRemap count.
-
Constructor Summary
Constructors Constructor Description GridPartitionedSingleGetFuture(GridCacheContext cctx, KeyCacheObject key, AffinityTopologyVersion topVer, boolean readThrough, boolean forcePrimary, String taskName, boolean deserializeBinary, @Nullable IgniteCacheExpiryPolicy expiryPlc, boolean skipVals, boolean needVer, boolean keepCacheObjects, boolean recovery, String txLbl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDiagnosticRequest(IgniteDiagnosticPrepareContext ctx)IgniteUuidfutureId()protected Set<ClusterNode>getInvalidNodes()voidinit()Initialize future.voidmarkNotTrackable()Marks this future as non-trackable.booleanonDone(Object res, Throwable err)Callback to notify that future is finished.booleanonNodeLeft(UUID nodeId)Callback for when node left.voidonResult(UUID nodeId, GridNearGetResponse res)voidonResult(UUID nodeId, GridNearSingleGetResponse res)StringtoString()booleantrackable()-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheFutureAdapter
duration, onDone, startTime
-
Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter
cancel, chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, listen, logger, onCancelled, 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
-
MAX_REMAP_CNT
protected static final int MAX_REMAP_CNT
Maximum number of attempts to remap key to the same primary node.
-
REMAP_CNT_UPD
protected static final AtomicIntegerFieldUpdater<GridPartitionedSingleGetFuture> REMAP_CNT_UPD
Remap count updater.
-
deploymentLdrId
@GridToStringExclude protected final IgniteUuid deploymentLdrId
Deployment class loader id which will be used for deserialization of entries on a distributed task.
-
remapCnt
protected volatile int remapCnt
Remap count.
-
-
Constructor Detail
-
GridPartitionedSingleGetFuture
public GridPartitionedSingleGetFuture(GridCacheContext cctx, KeyCacheObject key, AffinityTopologyVersion topVer, boolean readThrough, boolean forcePrimary, String taskName, boolean deserializeBinary, @Nullable @Nullable IgniteCacheExpiryPolicy expiryPlc, boolean skipVals, boolean needVer, boolean keepCacheObjects, boolean recovery, String txLbl)
- Parameters:
cctx- Context.key- Key.topVer- Topology version.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.txLbl- Transaction label.
-
-
Method Detail
-
init
public void init()
Initialize future.
-
onResult
public void onResult(UUID nodeId, GridNearSingleGetResponse res)
- Parameters:
nodeId- Node ID.res- Result.
-
onResult
public void onResult(UUID nodeId, GridNearGetResponse res)
- Specified by:
onResultin interfaceCacheGetFuture- Parameters:
nodeId- Node ID.res- Response.
-
getInvalidNodes
protected Set<ClusterNode> getInvalidNodes()
- Returns:
- Set of invalid cluster nodes.
-
futureId
public IgniteUuid futureId()
- Specified by:
futureIdin interfaceGridCacheFuture<Object>- Returns:
- Unique identifier for this future.
-
onNodeLeft
public boolean onNodeLeft(UUID nodeId)
Callback for when node left.- Specified by:
onNodeLeftin interfaceGridCacheFuture<Object>- Parameters:
nodeId- Left node ID.- Returns:
Trueif future cared about this node.
-
onDone
public boolean onDone(Object res, Throwable err)
Callback to notify that future is finished. Note that if non-nullexception is passed in the result value will be ignored.- Overrides:
onDonein classGridFutureAdapter<Object>- Parameters:
res- Optional result.err- Optional error.- Returns:
Trueif result was set by this call.
-
trackable
public boolean trackable()
- Specified by:
trackablein interfaceGridCacheFuture<Object>- Returns:
Trueif future should be tracked.
-
markNotTrackable
public void markNotTrackable()
Marks this future as non-trackable.- Specified by:
markNotTrackablein interfaceGridCacheFuture<Object>
-
addDiagnosticRequest
public void addDiagnosticRequest(IgniteDiagnosticPrepareContext ctx)
- Specified by:
addDiagnosticRequestin interfaceIgniteDiagnosticAware- Parameters:
ctx- Context.
-
toString
public String toString()
- Overrides:
toStringin classGridFutureAdapter<Object>
-
-