public final class GridDhtLockFuture extends GridCacheCompoundIdentityFuture<Boolean> implements GridCacheVersionedFuture<Boolean>, GridDhtFuture<Boolean>, GridCacheMappedVersion, DhtLockFuture<Boolean>
| Constructor and Description |
|---|
GridDhtLockFuture(GridCacheContext<?,?> cctx,
UUID nearNodeId,
GridCacheVersion nearLockVer,
@NotNull AffinityTopologyVersion topVer,
int cnt,
boolean read,
boolean needReturnVal,
long timeout,
GridDhtTxLocalAdapter tx,
long threadId,
long createTtl,
long accessTtl,
CacheEntryPredicate[] filter,
boolean skipStore,
boolean keepBinary) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable GridCacheMvccCandidate |
addEntry(GridDhtCacheEntry entry)
Adds entry to future.
|
boolean |
cancel()
Default no-op implementation that always returns
false. |
Collection<GridDhtCacheEntry> |
entries() |
IgniteUuid |
futureId() |
int |
hashCode() |
Collection<Integer> |
invalidPartitions()
Node that future should be able to provide keys to retry before
it completes, so it's not necessary to wait till future is done
to get retry keys.
|
void |
map() |
@Nullable GridCacheVersion |
mappedVersion()
Mapping should occur only if this interface returns a non-null value.
|
void |
markNotTrackable()
Marks this future as non-trackable.
|
GridCacheVersion |
nearLockVersion() |
boolean |
onDone(@Nullable Boolean success,
@Nullable 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)
Callback for whenever entry lock ownership changes.
|
String |
toString() |
boolean |
trackable() |
GridCacheVersion |
version() |
duration, onDone, startTimeadd, apply, clear, future, futures, futuresCountNoLock, hasFutures, hasPending, ignoreFailure, initialized, logDebug, logError, markInitialized, processFailurechain, chain, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, reset, resultclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitduration, startTimechain, chain, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, resultpublic GridDhtLockFuture(GridCacheContext<?,?> cctx, UUID nearNodeId, GridCacheVersion nearLockVer, @NotNull @NotNull AffinityTopologyVersion topVer, int cnt, boolean read, boolean needReturnVal, long timeout, GridDhtTxLocalAdapter tx, long threadId, long createTtl, long accessTtl, CacheEntryPredicate[] filter, boolean skipStore, boolean keepBinary)
cctx - Cache context.nearNodeId - Near node ID.nearLockVer - Near lock version.topVer - Topology version.cnt - Number of keys to lock.read - Read flag.needReturnVal - Need return value flag.timeout - Lock acquisition timeout.tx - Transaction.threadId - Thread ID.accessTtl - TTL for read operation.filter - Filter.skipStore - Skip store flag.public Collection<Integer> invalidPartitions()
invalidPartitions in interface GridDhtFuture<Boolean>public GridCacheVersion version()
version in interface GridCacheVersionedFuture<Boolean>public boolean trackable()
trackable in interface GridCacheFuture<Boolean>True if future should be tracked.public void markNotTrackable()
markNotTrackable in interface GridCacheFuture<Boolean>public Collection<GridDhtCacheEntry> entries()
public IgniteUuid futureId()
futureId in interface GridCacheFuture<Boolean>public GridCacheVersion nearLockVersion()
@Nullable public @Nullable GridCacheVersion mappedVersion()
mappedVersion in interface GridCacheMappedVersion@Nullable public @Nullable GridCacheMvccCandidate addEntry(GridDhtCacheEntry entry) throws GridCacheEntryRemovedException, GridDistributedLockCancelledException
entry - Entry to add.GridCacheEntryRemovedException - If entry was removed.GridDistributedLockCancelledException - If lock is canceled.public boolean onNodeLeft(UUID nodeId)
GridCacheFutureonNodeLeft in interface GridCacheFuture<Boolean>nodeId - Left node IDTrue if node was in the list.public void onError(Throwable t)
onError in interface DhtLockFuture<Boolean>t - Error.public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)
onOwnerChanged in interface GridCacheVersionedFuture<Boolean>entry - Entry whose lock ownership changed.owner - Owner.True if future cares about this entry.public boolean cancel()
false.
Futures that do support cancellation should override this method
and call GridFutureAdapter.onCancelled() callback explicitly if cancellation
indeed did happen.cancel in interface IgniteInternalFuture<Boolean>cancel in class GridCompoundFuture<Boolean,Boolean>True if future was canceled (i.e. was not finished prior to this call).public boolean onDone(@Nullable
@Nullable Boolean success,
@Nullable
@Nullable Throwable err)
null exception is passed in
the result value will be ignored.onDone in class GridFutureAdapter<Boolean>success - Optional result.err - Optional error.True if result was set by this call.public void map()
public String toString()
toString in class GridCompoundIdentityFuture<Boolean>
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.1 Release Date : May 21 2020