Class GridNearTxFinishFuture<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<IgniteInternalTx>
-
- org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture<K,V>
-
- All Implemented Interfaces:
Serializable,IgniteInternalFuture<IgniteInternalTx>,NearTxFinishFuture,GridCacheFuture<IgniteInternalTx>,IgniteInClosure<IgniteInternalFuture<IgniteInternalTx>>
public final class GridNearTxFinishFuture<K,V> extends GridCacheCompoundIdentityFuture<IgniteInternalTx> implements NearTxFinishFuture
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringALL_PARTITION_OWNERS_LEFT_GRID_MSGAll owners left grid message.
-
Constructor Summary
Constructors Constructor Description GridNearTxFinishFuture(GridCacheSharedContext<K,V> cctx, GridNearTxLocal tx, boolean commit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancommit()voidfinish(boolean commit, boolean clearThreadMap, boolean onTimeout)IgniteUuidfutureId()voidmarkNotTrackable()Marks this future as not trackable.booleanonDone(IgniteInternalTx tx0, Throwable err)Callback to notify that future is finished.booleanonNodeLeft(UUID nodeId)Callback for when node left.voidonNodeStop(IgniteCheckedException e)voidonResult(UUID nodeId, GridDhtTxFinishResponse res)voidonResult(UUID nodeId, GridNearTxFinishResponse res)StringtoString()booleantrackable()GridNearTxLocaltx()-
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, 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
-
ALL_PARTITION_OWNERS_LEFT_GRID_MSG
public static final String ALL_PARTITION_OWNERS_LEFT_GRID_MSG
All owners left grid message.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GridNearTxFinishFuture
public GridNearTxFinishFuture(GridCacheSharedContext<K,V> cctx, GridNearTxLocal tx, boolean commit)
- Parameters:
cctx- Context.tx- Transaction.commit- Commit flag.
-
-
Method Detail
-
commit
public boolean commit()
- Specified by:
commitin interfaceNearTxFinishFuture- Returns:
- Commit flag.
-
futureId
public IgniteUuid futureId()
- Specified by:
futureIdin interfaceGridCacheFuture<K>- Returns:
- Unique identifier for this future.
-
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.
-
tx
public GridNearTxLocal tx()
- Specified by:
txin interfaceNearTxFinishFuture- Returns:
- Transaction.
-
trackable
public boolean trackable()
- Specified by:
trackablein interfaceGridCacheFuture<K>- Returns:
Trueif future should be tracked.
-
markNotTrackable
public void markNotTrackable()
Marks this future as not trackable.- Specified by:
markNotTrackablein interfaceGridCacheFuture<K>
-
onResult
public void onResult(UUID nodeId, GridNearTxFinishResponse res)
- Parameters:
nodeId- Sender.res- Result.
-
onResult
public void onResult(UUID nodeId, GridDhtTxFinishResponse res)
- Parameters:
nodeId- Sender.res- Result.
-
onDone
public boolean onDone(IgniteInternalTx tx0, 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<IgniteInternalTx>- Parameters:
tx0- Optional result.err- Optional error.- Returns:
Trueif result was set by this call.
-
finish
public void finish(boolean commit, boolean clearThreadMap, boolean onTimeout)- Specified by:
finishin interfaceNearTxFinishFuture- Parameters:
commit- Commit flag.clearThreadMap- IftrueremovesGridNearTxLocalfrom thread map.onTimeout- Iftruecalled from timeout handler.
-
onNodeStop
public void onNodeStop(IgniteCheckedException e)
- Specified by:
onNodeStopin interfaceNearTxFinishFuture- Parameters:
e- Error.
-
toString
public String toString()
- Overrides:
toStringin classGridCompoundIdentityFuture<IgniteInternalTx>
-
-