Class GridDhtTxFinishFuture<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.dht.GridDhtTxFinishFuture<K,V>
-
- All Implemented Interfaces:
Serializable,IgniteDiagnosticAware,IgniteInternalFuture<IgniteInternalTx>,GridCacheFuture<IgniteInternalTx>,IgniteInClosure<IgniteInternalFuture<IgniteInternalTx>>
public final class GridDhtTxFinishFuture<K,V> extends GridCacheCompoundIdentityFuture<IgniteInternalTx> implements IgniteDiagnosticAware
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GridDhtTxFinishFuture(GridCacheSharedContext<K,V> cctx, GridDhtTxLocalAdapter tx, boolean commit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDiagnosticRequest(IgniteDiagnosticPrepareContext ctx)voidfinish(boolean commit)Initializes future.IgniteUuidfutureId()voidmarkNotTrackable()Marks this future as non-trackable.booleanonDone(IgniteInternalTx tx, Throwable err)Callback to notify that future is finished.booleanonNodeLeft(UUID nodeId)Callback for when node left.voidonResult(UUID nodeId, GridDhtTxFinishResponse res)voidrollbackOnError(Throwable e)StringtoString()booleantrackable()GridDhtTxLocalAdaptertx()-
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
-
-
-
-
Constructor Detail
-
GridDhtTxFinishFuture
public GridDhtTxFinishFuture(GridCacheSharedContext<K,V> cctx, GridDhtTxLocalAdapter tx, boolean commit)
- Parameters:
cctx- Context.tx- Transaction.commit- Commit flag.
-
-
Method Detail
-
tx
public GridDhtTxLocalAdapter tx()
- Returns:
- Transaction.
-
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.
-
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>
-
rollbackOnError
public void rollbackOnError(Throwable e)
- Parameters:
e- Error.
-
onResult
public void onResult(UUID nodeId, GridDhtTxFinishResponse res)
- Parameters:
nodeId- Sender.res- Result.
-
onDone
public boolean onDone(IgniteInternalTx tx, 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:
tx- Optional result.err- Optional error.- Returns:
Trueif result was set by this call.
-
finish
public void finish(boolean commit)
Initializes future.- Parameters:
commit- Commit flag.
-
addDiagnosticRequest
public void addDiagnosticRequest(IgniteDiagnosticPrepareContext ctx)
- Specified by:
addDiagnosticRequestin interfaceIgniteDiagnosticAware- Parameters:
ctx- Context.
-
toString
public String toString()
- Overrides:
toStringin classGridCompoundIdentityFuture<IgniteInternalTx>
-
-