Class GridNearTxPrepareFutureAdapter
- 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
-
- All Implemented Interfaces:
Serializable,IgniteInternalFuture<IgniteInternalTx>,GridCacheFuture<IgniteInternalTx>,GridCacheVersionedFuture<IgniteInternalTx>,IgniteInClosure<IgniteInternalFuture<Object>>
- Direct Known Subclasses:
GridNearOptimisticTxPrepareFutureAdapter,GridNearPessimisticTxPrepareFuture
public abstract class GridNearTxPrepareFutureAdapter extends GridCacheCompoundFuture<Object,IgniteInternalTx> implements GridCacheVersionedFuture<IgniteInternalTx>
Common code for tx prepare in optimistic and pessimistic modes.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected GridCacheSharedContext<?,?>cctxContext.protected ThrowableerrError.protected static AtomicReferenceFieldUpdater<GridNearTxPrepareFutureAdapter,Throwable>ERR_UPDError updater.protected IgniteUuidfutIdFuture ID.protected static IgniteLoggerlogLogger.protected static AtomicReference<IgniteLogger>logRefLogger reference.protected static IgniteLoggermsgLogLogger.protected booleantrackableTrackable flag.protected GridNearTxLocaltxTransaction.
-
Constructor Summary
Constructors Constructor Description GridNearTxPrepareFutureAdapter(GridCacheSharedContext cctx, GridNearTxLocal tx)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IgniteUuidfutureId()voidmarkNotTrackable()Marks this future as non-trackable.abstract voidonNearTxLocalTimeout()Called when relatedGridNearTxLocalis completed asynchronously on timeout,abstract voidonResult(UUID nodeId, GridNearTxPrepareResponse res)abstract voidprepare()Prepares transaction.booleantrackable()IgniteInternalTxtx()GridCacheVersionversion()-
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
-
logRef
protected static final AtomicReference<IgniteLogger> logRef
Logger reference.
-
ERR_UPD
protected static final AtomicReferenceFieldUpdater<GridNearTxPrepareFutureAdapter,Throwable> ERR_UPD
Error updater.
-
log
protected static IgniteLogger log
Logger.
-
msgLog
protected static IgniteLogger msgLog
Logger.
-
cctx
protected GridCacheSharedContext<?,?> cctx
Context.
-
futId
@GridToStringInclude protected IgniteUuid futId
Future ID.
-
tx
@GridToStringInclude protected GridNearTxLocal tx
Transaction.
-
err
@GridToStringExclude protected volatile Throwable err
Error.
-
trackable
protected boolean trackable
Trackable flag.
-
-
Constructor Detail
-
GridNearTxPrepareFutureAdapter
public GridNearTxPrepareFutureAdapter(GridCacheSharedContext cctx, GridNearTxLocal tx)
- Parameters:
cctx- Context.tx- Transaction.
-
-
Method Detail
-
futureId
public IgniteUuid futureId()
- Specified by:
futureIdin interfaceGridCacheFuture<IgniteInternalTx>- Returns:
- Unique identifier for this future.
-
version
public GridCacheVersion version()
- Specified by:
versionin interfaceGridCacheVersionedFuture<IgniteInternalTx>- Returns:
- Future version.
-
markNotTrackable
public void markNotTrackable()
Marks this future as non-trackable.- Specified by:
markNotTrackablein interfaceGridCacheFuture<IgniteInternalTx>
-
trackable
public boolean trackable()
- Specified by:
trackablein interfaceGridCacheFuture<IgniteInternalTx>- Returns:
Trueif future should be tracked.
-
onNearTxLocalTimeout
public abstract void onNearTxLocalTimeout()
Called when relatedGridNearTxLocalis completed asynchronously on timeout,
-
tx
public IgniteInternalTx tx()
- Returns:
- Transaction.
-
prepare
public abstract void prepare()
Prepares transaction.
-
onResult
public abstract void onResult(UUID nodeId, GridNearTxPrepareResponse res)
- Parameters:
nodeId- Sender.res- Result.
-
-