Class GridDhtTxPrepareFuture
- 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<IgniteInternalTx,GridNearTxPrepareResponse>
-
- org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture
-
- All Implemented Interfaces:
Serializable,IgniteDiagnosticAware,IgniteInternalFuture<GridNearTxPrepareResponse>,GridCacheFuture<GridNearTxPrepareResponse>,GridCacheVersionedFuture<GridNearTxPrepareResponse>,IgniteInClosure<IgniteInternalFuture<IgniteInternalTx>>
public final class GridDhtTxPrepareFuture extends GridCacheCompoundFuture<IgniteInternalTx,GridNearTxPrepareResponse> implements GridCacheVersionedFuture<GridNearTxPrepareResponse>, IgniteDiagnosticAware
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected IgniteUuiddeploymentLdrIdDeployment class loader id which will be used for deserialization of entries on a distributed task.
-
Constructor Summary
Constructors Constructor Description GridDhtTxPrepareFuture(GridCacheSharedContext cctx, GridDhtTxLocalAdapter tx, long timeout, int nearMiniId, Map<IgniteTxKey,GridCacheVersion> dhtVerMap, boolean last, boolean retVal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDiagnosticRequest(IgniteDiagnosticPrepareContext req)voidcomplete()Completes this future.IgniteUuidfutureId()@Nullable IgniteLoggerlogger()voidmarkNotTrackable()Marks this future as non-trackable.booleanonDone(GridNearTxPrepareResponse res0, Throwable err)Callback to notify that future is finished.voidonError(Throwable t)booleanonNodeLeft(UUID nodeId)Callback for when node left.booleanonOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)voidonResult(UUID nodeId, GridDhtTxPrepareResponse res)voidprepare(GridNearTxPrepareRequest req)Initializes future.StringtoString()booleantrackable()GridDhtTxLocalAdaptertx()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
-
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, 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
-
-
-
-
Field Detail
-
deploymentLdrId
@GridToStringExclude protected final IgniteUuid deploymentLdrId
Deployment class loader id which will be used for deserialization of entries on a distributed task.
-
-
Constructor Detail
-
GridDhtTxPrepareFuture
public GridDhtTxPrepareFuture(GridCacheSharedContext cctx, GridDhtTxLocalAdapter tx, long timeout, int nearMiniId, Map<IgniteTxKey,GridCacheVersion> dhtVerMap, boolean last, boolean retVal)
- Parameters:
cctx- Context.tx- Transaction.timeout- Timeout.nearMiniId- Near mini future id.dhtVerMap- DHT versions map.last-Trueif this is last prepare operation for node.retVal- Return value flag.
-
-
Method Detail
-
logger
@Nullable public @Nullable IgniteLogger logger()
- Overrides:
loggerin classGridFutureAdapter<GridNearTxPrepareResponse>- Returns:
- Logger instance.
-
futureId
public IgniteUuid futureId()
- Specified by:
futureIdin interfaceGridCacheFuture<GridNearTxPrepareResponse>- Returns:
- Unique identifier for this future.
-
version
public GridCacheVersion version()
- Specified by:
versionin interfaceGridCacheVersionedFuture<GridNearTxPrepareResponse>- Returns:
- Future version.
-
onOwnerChanged
public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)
- Specified by:
onOwnerChangedin interfaceGridCacheVersionedFuture<GridNearTxPrepareResponse>- Parameters:
entry- Entry which received new owner.owner- Owner.- Returns:
Trueif future cares about this entry.
-
trackable
public boolean trackable()
- Specified by:
trackablein interfaceGridCacheFuture<GridNearTxPrepareResponse>- Returns:
Trueif future should be tracked.
-
markNotTrackable
public void markNotTrackable()
Marks this future as non-trackable.- Specified by:
markNotTrackablein interfaceGridCacheFuture<GridNearTxPrepareResponse>
-
tx
public GridDhtTxLocalAdapter tx()
- Returns:
- Transaction.
-
onNodeLeft
public boolean onNodeLeft(UUID nodeId)
Callback for when node left.- Specified by:
onNodeLeftin interfaceGridCacheFuture<GridNearTxPrepareResponse>- Parameters:
nodeId- Left node ID.- Returns:
Trueif future cared about this node.
-
onError
public void onError(Throwable t)
- Parameters:
t- Error.
-
onResult
public void onResult(UUID nodeId, GridDhtTxPrepareResponse res)
- Parameters:
nodeId- Sender.res- Result.
-
onDone
public boolean onDone(GridNearTxPrepareResponse res0, 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<GridNearTxPrepareResponse>- Parameters:
res0- Optional result.err- Optional error.- Returns:
Trueif result was set by this call.
-
complete
public void complete()
Completes this future.
-
prepare
public void prepare(GridNearTxPrepareRequest req)
Initializes future.- Parameters:
req- Prepare request.
-
addDiagnosticRequest
public void addDiagnosticRequest(IgniteDiagnosticPrepareContext req)
- Specified by:
addDiagnosticRequestin interfaceIgniteDiagnosticAware- Parameters:
req- Context.
-
toString
public String toString()
- Overrides:
toStringin classGridCompoundFuture<IgniteInternalTx,GridNearTxPrepareResponse>
-
-