public final class GridDhtTxPrepareFuture extends GridCacheCompoundFuture<IgniteInternalTx,GridNearTxPrepareResponse> implements GridCacheMvccFuture<GridNearTxPrepareResponse>
Constructor and Description |
---|
GridDhtTxPrepareFuture(GridCacheSharedContext cctx,
GridDhtTxLocalAdapter tx,
long timeout,
int nearMiniId,
Map<IgniteTxKey,GridCacheVersion> dhtVerMap,
boolean last,
boolean retVal) |
Modifier and Type | Method and Description |
---|---|
void |
complete()
Completes this future.
|
IgniteUuid |
futureId() |
void |
markNotTrackable()
Marks this future as non-trackable.
|
boolean |
onDone(GridNearTxPrepareResponse res0,
Throwable err)
Callback to notify that future is finished.
|
void |
onError(Throwable t) |
boolean |
onNodeLeft(UUID nodeId)
Callback for when node left.
|
boolean |
onOwnerChanged(GridCacheEntryEx entry,
GridCacheMvccCandidate owner) |
void |
onResult(UUID nodeId,
GridDhtTxPrepareResponse res) |
void |
prepare(Collection<IgniteTxEntry> reads,
Collection<IgniteTxEntry> writes,
Map<UUID,Collection<UUID>> txNodes)
Initializes future.
|
String |
toString() |
boolean |
trackable() |
GridDhtTxLocalAdapter |
tx() |
GridCacheVersion |
version() |
duration, onDone, startTime
add, apply, cancel, clear, future, futures, futuresCountNoLock, hasFutures, hasPending, ignoreFailure, initialized, markInitialized
chain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, result
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
duration, startTime
cancel, chain, chain, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, result
public GridDhtTxPrepareFuture(GridCacheSharedContext cctx, GridDhtTxLocalAdapter tx, long timeout, int nearMiniId, Map<IgniteTxKey,GridCacheVersion> dhtVerMap, boolean last, boolean retVal)
cctx
- Context.tx
- Transaction.timeout
- Timeout.nearMiniId
- Near mini future id.dhtVerMap
- DHT versions map.last
- True
if this is last prepare operation for node.retVal
- Return value flag.public IgniteUuid futureId()
futureId
in interface GridCacheFuture<GridNearTxPrepareResponse>
public GridCacheVersion version()
version
in interface GridCacheMvccFuture<GridNearTxPrepareResponse>
public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)
onOwnerChanged
in interface GridCacheMvccFuture<GridNearTxPrepareResponse>
entry
- Entry which received new owner.owner
- Owner.True
if future cares about this entry.public boolean trackable()
trackable
in interface GridCacheFuture<GridNearTxPrepareResponse>
True
if future should be tracked.public void markNotTrackable()
markNotTrackable
in interface GridCacheFuture<GridNearTxPrepareResponse>
public GridDhtTxLocalAdapter tx()
public boolean onNodeLeft(UUID nodeId)
onNodeLeft
in interface GridCacheFuture<GridNearTxPrepareResponse>
nodeId
- Left node ID.True
if future cared about this node.public void onError(Throwable t)
t
- Error.public void onResult(UUID nodeId, GridDhtTxPrepareResponse res)
nodeId
- Sender.res
- Result.public boolean onDone(GridNearTxPrepareResponse res0, Throwable err)
null
exception is passed in
the result value will be ignored.onDone
in class GridFutureAdapter<GridNearTxPrepareResponse>
res0
- Optional result.err
- Optional error.True
if result was set by this call.public void complete()
public void prepare(Collection<IgniteTxEntry> reads, Collection<IgniteTxEntry> writes, Map<UUID,Collection<UUID>> txNodes)
reads
- Read entries.writes
- Write entries.txNodes
- Transaction nodes mapping.public String toString()
toString
in class GridCompoundFuture<IgniteInternalTx,GridNearTxPrepareResponse>
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017