public abstract class GridDhtTxAbstractEnlistFuture<T> extends GridCacheFutureAdapter<T> implements DhtLockFuture<T>
| Modifier and Type | Class and Description |
|---|---|
protected class |
GridDhtTxAbstractEnlistFuture.LockTimeoutObject
Lock request timeout object.
|
| Modifier and Type | Field and Description |
|---|---|
protected GridCacheContext<?,?> |
cctx
Cache registry.
|
protected IgniteUuid |
futId
Future ID.
|
protected boolean |
hasNearNodeUpdates
There are keys belonging to backup partitions on near node.
|
protected GridCacheVersion |
lockVer
Lock version.
|
protected IgniteLogger |
log
Logger.
|
protected MvccSnapshot |
mvccSnapshot |
protected IgniteUuid |
nearFutId
Future ID.
|
protected GridCacheVersion |
nearLockVer
Near lock version.
|
protected int |
nearMiniId
Future ID.
|
protected UUID |
nearNodeId
Near node ID.
|
protected Set<UUID> |
newDhtNodes
New DHT nodes.
|
protected int[] |
parts
Partitions.
|
protected boolean |
skipNearNodeUpdates
Do not send DHT requests to near node.
|
protected long |
threadId
Thread.
|
protected long |
timeout
Lock timeout.
|
protected GridDhtTxAbstractEnlistFuture.LockTimeoutObject |
timeoutObj
Timeout object.
|
protected GridDhtTxLocalAdapter |
tx
Transaction.
|
| Modifier | Constructor and Description |
|---|---|
protected |
GridDhtTxAbstractEnlistFuture(UUID nearNodeId,
GridCacheVersion nearLockVer,
MvccSnapshot mvccSnapshot,
long threadId,
IgniteUuid nearFutId,
int nearMiniId,
int[] parts,
GridDhtTxLocalAdapter tx,
long timeout,
GridCacheContext<?,?> cctx,
CacheEntryPredicate filter) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearLockFuture()
Clears lock future.
|
protected abstract UpdateSourceIterator<?> |
createIterator()
Gets source to be updated iterator.
|
IgniteUuid |
futureId() |
void |
init() |
void |
markNotTrackable()
Marks this future as non-trackable.
|
boolean |
needResult()
Gets need previous value flag.
|
boolean |
onDone(T res,
Throwable err)
Callback to notify that future is finished.
|
protected abstract void |
onEntryProcessed(KeyCacheObject key,
GridCacheUpdateTxResult res)
Entry processed callback.
|
void |
onError(Throwable error) |
boolean |
onNodeLeft(UUID nodeId)
Callback for when node left.
|
void |
onResult(UUID nodeId,
GridDhtTxQueryEnlistResponse res)
Callback on backup response.
|
protected abstract T |
result0()
Gets query result.
|
protected IgniteTxTimeoutCheckedException |
timeoutException() |
boolean |
trackable() |
duration, onDone, startTimecancel, chain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, reset, result, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcancel, chain, chain, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, resultprotected final IgniteUuid futId
@GridToStringExclude protected final GridCacheContext<?,?> cctx
@GridToStringExclude protected final IgniteLogger log
protected final long threadId
protected final IgniteUuid nearFutId
protected final int nearMiniId
protected final int[] parts
protected final GridDhtTxLocalAdapter tx
protected final GridCacheVersion lockVer
protected final MvccSnapshot mvccSnapshot
protected final UUID nearNodeId
protected final GridCacheVersion nearLockVer
@GridToStringExclude protected GridDhtTxAbstractEnlistFuture.LockTimeoutObject timeoutObj
protected final long timeout
protected boolean skipNearNodeUpdates
protected boolean hasNearNodeUpdates
protected GridDhtTxAbstractEnlistFuture(UUID nearNodeId, GridCacheVersion nearLockVer, MvccSnapshot mvccSnapshot, long threadId, IgniteUuid nearFutId, int nearMiniId, @Nullable int[] parts, GridDhtTxLocalAdapter tx, long timeout, GridCacheContext<?,?> cctx, @Nullable CacheEntryPredicate filter)
nearNodeId - Near node ID.nearLockVer - Near lock version.mvccSnapshot - Mvcc snapshot.threadId - Thread ID.nearFutId - Near future id.nearMiniId - Near mini future id.parts - Partitions.tx - Transaction.timeout - Lock acquisition timeout.cctx - Cache context.filter - Filter.protected abstract UpdateSourceIterator<?> createIterator() throws IgniteCheckedException
IgniteCheckedException - If failed.protected abstract T result0()
public boolean needResult()
True if previous value is required.protected abstract void onEntryProcessed(KeyCacheObject key, GridCacheUpdateTxResult res)
key - Entry key.res - Update result.public void init()
protected void clearLockFuture()
public void onResult(UUID nodeId, GridDhtTxQueryEnlistResponse res)
nodeId - Backup node.res - Response.public boolean trackable()
trackable in interface GridCacheFuture<T>True if future should be tracked.public void markNotTrackable()
markNotTrackable in interface GridCacheFuture<T>public IgniteUuid futureId()
futureId in interface GridCacheFuture<T>public boolean onNodeLeft(UUID nodeId)
onNodeLeft in interface GridCacheFuture<T>nodeId - Left node ID.True if future cared about this node.public boolean onDone(@Nullable
T res,
@Nullable
Throwable err)
null exception is passed in
the result value will be ignored.onDone in class GridFutureAdapter<T>res - Optional result.err - Optional error.True if result was set by this call.public void onError(Throwable error)
onError in interface DhtLockFuture<T>error - Error.@NotNull protected IgniteTxTimeoutCheckedException timeoutException()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019