Class GridNearAtomicAbstractUpdateFuture
- 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.atomic.GridNearAtomicAbstractUpdateFuture
-
- All Implemented Interfaces:
IgniteInternalFuture<Object>,GridCacheAtomicFuture<Object>,GridCacheFuture<Object>
- Direct Known Subclasses:
GridNearAtomicSingleUpdateFuture,GridNearAtomicUpdateFuture
public abstract class GridNearAtomicAbstractUpdateFuture extends GridCacheFutureAdapter<Object> implements GridCacheAtomicFuture<Object>
Base for near atomic update futures.
-
-
Field Summary
Fields Modifier and Type Field Description protected GridDhtAtomicCachecacheCache.protected GridCacheContextcctxCache context.protected IgniteUuiddeploymentLdrIdDeployment class loader id which will be used for deserialization of entries on a distributed task.protected CachePartialUpdateCheckedExceptionerrError.protected javax.cache.expiry.ExpiryPolicyexpiryPlcExpiry policy.protected CacheEntryPredicate[]filterOptional filter.protected longfutIdFuture ID, changes when operation is remapped.protected Object[]invokeArgsOptional arguments for entry processor.protected booleankeepBinaryKeep binary flag.protected static IgniteLoggerlogLogger.protected static IgniteLoggermsgLogLogger.protected booleannearEnabledNear cache flag.protected GridCacheOperationopUpdate operation.protected GridCacheReturnopResOperation result.protected booleanrecoveryRecovery flag.protected intremapCntRemap count.protected AffinityTopologyVersionremapTopVerprotected booleanretvalReturn value require flag.protected booleanskipStoreSkip store flag.protected CacheWriteSynchronizationModesyncModeWrite synchronization mode.protected inttaskNameHashTask name hash.protected booleantopLockedTopology locked flag.protected AffinityTopologyVersiontopVerCurrent topology version.
-
Constructor Summary
Constructors Modifier Constructor Description protectedGridNearAtomicAbstractUpdateFuture(GridCacheContext cctx, GridDhtAtomicCache cache, CacheWriteSynchronizationMode syncMode, GridCacheOperation op, @Nullable Object[] invokeArgs, boolean retval, @Nullable javax.cache.expiry.ExpiryPolicy expiryPlc, CacheEntryPredicate[] filter, int taskNameHash, boolean skipStore, boolean keepBinary, boolean recovery, int remapCnt)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IgniteInternalFuture<Void>completeFuture(AffinityTopologyVersion topVer)Gets future that will be completed when it is safe when update is finished on the given version of topology.IgniteUuidfutureId()voidmap()Performs future mapping.protected abstract voidmap(AffinityTopologyVersion topVer)protected abstract voidmapOnTopology()Maps future on ready topology.voidmarkNotTrackable()Marks this future as non-trackable.abstract voidonDhtResponse(UUID nodeId, GridDhtAtomicNearResponse res)booleanonDone(@Nullable Object res, @Nullable Throwable err)Callback to notify that future is finished.abstract voidonPrimaryResponse(UUID nodeId, GridNearAtomicUpdateResponse res, boolean nodeErr)Response callback.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.processors.cache.GridCacheFuture
duration, onNodeLeft, startTime
-
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
-
log
protected static IgniteLogger log
Logger.
-
msgLog
protected static IgniteLogger msgLog
Logger.
-
cctx
protected final GridCacheContext cctx
Cache context.
-
cache
protected final GridDhtAtomicCache cache
Cache.
-
syncMode
protected final CacheWriteSynchronizationMode syncMode
Write synchronization mode.
-
op
protected final GridCacheOperation op
Update operation.
-
invokeArgs
protected final Object[] invokeArgs
Optional arguments for entry processor.
-
retval
protected final boolean retval
Return value require flag.
-
expiryPlc
protected final javax.cache.expiry.ExpiryPolicy expiryPlc
Expiry policy.
-
filter
protected final CacheEntryPredicate[] filter
Optional filter.
-
taskNameHash
protected final int taskNameHash
Task name hash.
-
skipStore
protected final boolean skipStore
Skip store flag.
-
keepBinary
protected final boolean keepBinary
Keep binary flag.
-
recovery
protected final boolean recovery
Recovery flag.
-
nearEnabled
protected final boolean nearEnabled
Near cache flag.
-
deploymentLdrId
@GridToStringExclude protected final IgniteUuid deploymentLdrId
Deployment class loader id which will be used for deserialization of entries on a distributed task.
-
topLocked
protected boolean topLocked
Topology locked flag. Set if atomic update is performed inside a TX or explicit lock.
-
remapCnt
@GridToStringInclude protected int remapCnt
Remap count.
-
topVer
@GridToStringInclude protected AffinityTopologyVersion topVer
Current topology version.
-
remapTopVer
@GridToStringInclude protected AffinityTopologyVersion remapTopVer
-
err
@GridToStringInclude protected CachePartialUpdateCheckedException err
Error.
-
futId
@GridToStringInclude protected long futId
Future ID, changes when operation is remapped.
-
opRes
protected GridCacheReturn opRes
Operation result.
-
-
Constructor Detail
-
GridNearAtomicAbstractUpdateFuture
protected GridNearAtomicAbstractUpdateFuture(GridCacheContext cctx, GridDhtAtomicCache cache, CacheWriteSynchronizationMode syncMode, GridCacheOperation op, @Nullable @Nullable Object[] invokeArgs, boolean retval, @Nullable @Nullable javax.cache.expiry.ExpiryPolicy expiryPlc, CacheEntryPredicate[] filter, int taskNameHash, boolean skipStore, boolean keepBinary, boolean recovery, int remapCnt)
Constructor.- Parameters:
cctx- Cache context.cache- Cache.syncMode- Synchronization mode.op- Operation.invokeArgs- Invoke arguments.retval- Return value flag.expiryPlc- Expiry policy.filter- Filter.taskNameHash- Task name hash.skipStore- Skip store flag.keepBinary- Keep binary flag.recovery-Trueif cache operation is called in recovery mode.remapCnt- Remap count.
-
-
Method Detail
-
completeFuture
public final IgniteInternalFuture<Void> completeFuture(AffinityTopologyVersion topVer)
Gets future that will be completed when it is safe when update is finished on the given version of topology.- Specified by:
completeFuturein interfaceGridCacheAtomicFuture<Object>- Parameters:
topVer- Topology version to finish.- Returns:
- Future or
nullif no need to wait.
-
map
public final void map()
Performs future mapping.
-
map
protected abstract void map(AffinityTopologyVersion topVer)
- Parameters:
topVer- Topology version.
-
mapOnTopology
protected abstract void mapOnTopology()
Maps future on ready topology.
-
futureId
public IgniteUuid futureId()
- Specified by:
futureIdin interfaceGridCacheFuture<Object>- Returns:
- Unique identifier for this future.
-
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>
-
onPrimaryResponse
public abstract void onPrimaryResponse(UUID nodeId, GridNearAtomicUpdateResponse res, boolean nodeErr)
Response callback.- Parameters:
nodeId- Node ID.res- Update response.nodeErr-Trueif response was created on node failure.
-
onDhtResponse
public abstract void onDhtResponse(UUID nodeId, GridDhtAtomicNearResponse res)
- Parameters:
nodeId- Node ID.res- Response.
-
onDone
public final boolean onDone(@Nullable @Nullable Object res, @Nullable @Nullable 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.
-
toString
public String toString()
- Overrides:
toStringin classGridFutureAdapter<Object>
-
-