Class GridCacheTxRecoveryFuture
- 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<Boolean>
-
- org.apache.ignite.internal.processors.cache.distributed.GridCacheTxRecoveryFuture
-
- All Implemented Interfaces:
Serializable,IgniteInternalFuture<Boolean>,GridCacheFuture<Boolean>,IgniteInClosure<IgniteInternalFuture<Boolean>>
public class GridCacheTxRecoveryFuture extends GridCacheCompoundIdentityFuture<Boolean>
Future verifying that all remote transactions related to transaction were prepared or committed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GridCacheTxRecoveryFuture(GridCacheSharedContext<?,?> cctx, IgniteInternalTx tx, Set<UUID> failedNodeIds, Map<UUID,Collection<UUID>> txNodes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IgniteUuidfutureId()voidmarkNotTrackable()Marks this future as non-trackable.booleanonDone(@Nullable Boolean res, @Nullable Throwable err)Callback to notify that future is finished.booleanonNodeLeft(UUID nodeId)Callback for when node left.voidonResult(UUID nodeId, GridCacheTxRecoveryResponse res)voidprepare()Initializes future.StringtoString()booleantrackable()IgniteInternalTxtx()-
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
-
GridCacheTxRecoveryFuture
public GridCacheTxRecoveryFuture(GridCacheSharedContext<?,?> cctx, IgniteInternalTx tx, Set<UUID> failedNodeIds, Map<UUID,Collection<UUID>> txNodes)
- Parameters:
cctx- Context.tx- Transaction.failedNodeIds- IDs of failed nodes started transaction.txNodes- Transaction mapping.
-
-
Method Detail
-
prepare
public void prepare()
Initializes future.
-
onResult
public void onResult(UUID nodeId, GridCacheTxRecoveryResponse res)
- Parameters:
nodeId- Node ID.res- Response.
-
tx
public IgniteInternalTx tx()
- Returns:
- Transaction.
-
futureId
public IgniteUuid futureId()
- Returns:
- Unique identifier for this future.
-
onNodeLeft
public boolean onNodeLeft(UUID nodeId)
Callback for when node left.- Parameters:
nodeId- Left node ID.- Returns:
Trueif future cared about this node.
-
trackable
public boolean trackable()
- Returns:
Trueif future should be tracked.
-
markNotTrackable
public void markNotTrackable()
Marks this future as non-trackable.
-
onDone
public boolean onDone(@Nullable @Nullable Boolean 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<Boolean>- Parameters:
res- Optional result.err- Optional error.- Returns:
Trueif result was set by this call.
-
toString
public String toString()
- Overrides:
toStringin classGridCompoundIdentityFuture<Boolean>
-
-