Class GridNearPessimisticTxPrepareFuture
- java.lang.Object
-
- org.apache.ignite.internal.util.future.GridFutureAdapter<R>
-
- org.apache.ignite.internal.util.future.GridCompoundFuture<T,R>
-
- org.apache.ignite.internal.processors.cache.GridCacheCompoundFuture<Object,IgniteInternalTx>
-
- org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareFutureAdapter
-
- org.apache.ignite.internal.processors.cache.distributed.near.GridNearPessimisticTxPrepareFuture
-
- All Implemented Interfaces:
Serializable,IgniteInternalFuture<IgniteInternalTx>,GridCacheFuture<IgniteInternalTx>,GridCacheVersionedFuture<IgniteInternalTx>,IgniteInClosure<IgniteInternalFuture<Object>>
public class GridNearPessimisticTxPrepareFuture extends GridNearTxPrepareFutureAdapter
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GridNearPessimisticTxPrepareFuture(GridCacheSharedContext cctx, GridNearTxLocal tx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanignoreFailure(Throwable err)Checks if this compound future should ignore this particular exception.booleanonDone(@Nullable IgniteInternalTx res, @Nullable Throwable err)Callback to notify that future is finished.voidonNearTxLocalTimeout()Called when relatedGridNearTxLocalis completed asynchronously on timeout,booleanonNodeLeft(UUID nodeId)Callback for when node left.booleanonOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)voidonResult(UUID nodeId, GridNearTxPrepareResponse res)voidprepare()Prepares transaction.StringtoString()-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareFutureAdapter
futureId, markNotTrackable, trackable, tx, version
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheCompoundFuture
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, 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.processors.cache.GridCacheFuture
duration, 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
-
-
-
-
Constructor Detail
-
GridNearPessimisticTxPrepareFuture
public GridNearPessimisticTxPrepareFuture(GridCacheSharedContext cctx, GridNearTxLocal tx)
- Parameters:
cctx- Context.tx- Transaction.
-
-
Method Detail
-
onNearTxLocalTimeout
public void onNearTxLocalTimeout()
Called when relatedGridNearTxLocalis completed asynchronously on timeout,- Specified by:
onNearTxLocalTimeoutin classGridNearTxPrepareFutureAdapter
-
ignoreFailure
protected boolean ignoreFailure(Throwable err)
Checks if this compound future should ignore this particular exception.- Overrides:
ignoreFailurein classGridCompoundFuture<Object,IgniteInternalTx>- Parameters:
err- Exception to check.- Returns:
Trueif this error should be ignored.
-
onNodeLeft
public boolean onNodeLeft(UUID nodeId)
Callback for when node left.- Parameters:
nodeId- Left node ID.- Returns:
Trueif future cared about this node.
-
onResult
public void onResult(UUID nodeId, GridNearTxPrepareResponse res)
- Specified by:
onResultin classGridNearTxPrepareFutureAdapter- Parameters:
nodeId- Sender.res- Result.
-
prepare
public void prepare()
Prepares transaction.- Specified by:
preparein classGridNearTxPrepareFutureAdapter
-
onOwnerChanged
public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)
- Parameters:
entry- Entry which received new owner.owner- Owner.- Returns:
Trueif future cares about this entry.
-
onDone
public boolean onDone(@Nullable @Nullable IgniteInternalTx 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<IgniteInternalTx>- Parameters:
res- Optional result.err- Optional error.- Returns:
Trueif result was set by this call.
-
toString
public String toString()
- Overrides:
toStringin classGridCompoundFuture<Object,IgniteInternalTx>
-
-