Class GridNearOptimisticTxPrepareFutureAdapter
- 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
-
- All Implemented Interfaces:
Serializable,IgniteInternalFuture<IgniteInternalTx>,GridCacheFuture<IgniteInternalTx>,GridCacheVersionedFuture<IgniteInternalTx>,IgniteInClosure<IgniteInternalFuture<Object>>
- Direct Known Subclasses:
GridNearOptimisticSerializableTxPrepareFuture,GridNearOptimisticTxPrepareFuture
public abstract class GridNearOptimisticTxPrepareFutureAdapter extends GridNearTxPrepareFutureAdapter
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classGridNearOptimisticTxPrepareFutureAdapter.KeyLockFutureKeys lock future.
-
Field Summary
Fields Modifier and Type Field Description protected GridNearOptimisticTxPrepareFutureAdapter.KeyLockFuturekeyLockFutprotected SpanspanTracing span.
-
Constructor Summary
Constructors Modifier Constructor Description protectedGridNearOptimisticTxPrepareFutureAdapter(GridCacheSharedContext cctx, GridNearTxLocal tx)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleanerrorOrTimeoutOnTopologyVersion(IgniteCheckedException e, boolean timedOut)voidonNearTxLocalTimeout()Called when relatedGridNearTxLocalis completed asynchronously on timeout,voidprepare()Prepares transaction.protected abstract voidprepare0(boolean remap, boolean topLocked)protected voidprepareOnTopology(boolean remap, @Nullable Runnable c)protected GridDhtTopologyFuturetopologyReadLock()Acquires topology read lock.protected voidtopologyReadUnlock()Releases topology read lock.-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareFutureAdapter
futureId, markNotTrackable, onResult, 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, toString
-
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, 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, onNodeLeft, startTime
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheVersionedFuture
onOwnerChanged
-
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
-
span
protected Span span
Tracing span.
-
keyLockFut
@GridToStringExclude protected GridNearOptimisticTxPrepareFutureAdapter.KeyLockFuture keyLockFut
-
-
Constructor Detail
-
GridNearOptimisticTxPrepareFutureAdapter
protected GridNearOptimisticTxPrepareFutureAdapter(GridCacheSharedContext cctx, GridNearTxLocal tx)
- Parameters:
cctx- Context.tx- Transaction.
-
-
Method Detail
-
onNearTxLocalTimeout
public final void onNearTxLocalTimeout()
Called when relatedGridNearTxLocalis completed asynchronously on timeout,- Specified by:
onNearTxLocalTimeoutin classGridNearTxPrepareFutureAdapter
-
prepare
public final void prepare()
Prepares transaction.- Specified by:
preparein classGridNearTxPrepareFutureAdapter
-
topologyReadLock
protected final GridDhtTopologyFuture topologyReadLock()
Acquires topology read lock.- Returns:
- Topology ready future.
-
topologyReadUnlock
protected final void topologyReadUnlock()
Releases topology read lock.
-
prepareOnTopology
protected final void prepareOnTopology(boolean remap, @Nullable @Nullable Runnable c)- Parameters:
remap- Remap flag.c- Optional closure to run after map.
-
prepare0
protected abstract void prepare0(boolean remap, boolean topLocked)- Parameters:
remap- Remap flag.topLocked-Trueif thread already acquired lock preventing topology change.
-
errorOrTimeoutOnTopologyVersion
protected boolean errorOrTimeoutOnTopologyVersion(IgniteCheckedException e, boolean timedOut)
- Parameters:
e- Exception.timedOut-Trueif timed out.
-
-