Class GridNearOptimisticTxPrepareFuture
- 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.GridNearOptimisticTxPrepareFutureAdapter
-
- org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture
-
- All Implemented Interfaces:
Serializable,IgniteDiagnosticAware,IgniteInternalFuture<IgniteInternalTx>,GridCacheFuture<IgniteInternalTx>,GridCacheVersionedFuture<IgniteInternalTx>,IgniteInClosure<IgniteInternalFuture<Object>>
public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepareFutureAdapter implements IgniteDiagnosticAware
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter
GridNearOptimisticTxPrepareFutureAdapter.KeyLockFuture
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter
keyLockFut, span
-
-
Constructor Summary
Constructors Constructor Description GridNearOptimisticTxPrepareFuture(GridCacheSharedContext cctx, GridNearTxLocal tx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDiagnosticRequest(IgniteDiagnosticPrepareContext ctx)booleanonDone(IgniteInternalTx t, Throwable err)Callback to notify that future is finished.booleanonNodeLeft(UUID nodeId)Callback for when node left.booleanonOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)voidonResult(UUID nodeId, GridNearTxPrepareResponse res)protected voidprepare0(boolean remap, boolean topLocked)Initializes future.Set<IgniteTxKey>requestedKeys()StringtoString()-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter
errorOrTimeoutOnTopologyVersion, onNearTxLocalTimeout, prepare, prepareOnTopology, topologyReadLock, topologyReadUnlock
-
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, 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.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
-
GridNearOptimisticTxPrepareFuture
public GridNearOptimisticTxPrepareFuture(GridCacheSharedContext cctx, GridNearTxLocal tx)
- Parameters:
cctx- Context.tx- Transaction.
-
-
Method Detail
-
onOwnerChanged
public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)
- Specified by:
onOwnerChangedin interfaceGridCacheVersionedFuture<IgniteInternalTx>- Parameters:
entry- Entry which received new owner.owner- Owner.- Returns:
Trueif future cares about this entry.
-
onNodeLeft
public boolean onNodeLeft(UUID nodeId)
Callback for when node left.- Specified by:
onNodeLeftin interfaceGridCacheFuture<IgniteInternalTx>- 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.
-
requestedKeys
public Set<IgniteTxKey> requestedKeys()
- Returns:
- Keys for which
MiniFutureisn't completed.
-
onDone
public boolean onDone(IgniteInternalTx t, 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:
t- Optional result.err- Optional error.- Returns:
Trueif result was set by this call.
-
prepare0
protected void prepare0(boolean remap, boolean topLocked)Initializes future.- Specified by:
prepare0in classGridNearOptimisticTxPrepareFutureAdapter- Parameters:
remap- Remap flag.topLocked-Trueif thread already acquired lock preventing topology change.
-
addDiagnosticRequest
public void addDiagnosticRequest(IgniteDiagnosticPrepareContext ctx)
- Specified by:
addDiagnosticRequestin interfaceIgniteDiagnosticAware- Parameters:
ctx- Context.
-
toString
public String toString()
- Overrides:
toStringin classGridCompoundFuture<Object,IgniteInternalTx>
-
-