public final class GridDhtLockFuture extends GridCompoundIdentityFuture<Boolean> implements GridCacheMvccFuture<Boolean>, GridDhtFuture<Boolean>, GridCacheMappedVersion
AbstractQueuedSynchronizer.ConditionObjectsync| Constructor and Description |
|---|
GridDhtLockFuture(GridCacheContext<?,?> cctx,
UUID nearNodeId,
GridCacheVersion nearLockVer,
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 |
|---|---|
GridCacheMvccCandidate |
addEntry(GridDhtCacheEntry entry)
Adds entry to future.
|
boolean |
cancel()
Default no-op implementation that always returns
false. |
Collection<GridDhtCacheEntry> |
entries() |
Collection<GridDhtCacheEntry> |
entriesCopy() |
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() |
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(Boolean success,
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() |
add, apply, clear, future, futures, futuresCountNoLock, hasFutures, hasPending, ignoreFailure, initialized, markInitializedchain, chain, duration, endTime, error, get, get, get, get0, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, result, startTime, tryAcquireShared, tryReleaseSharedacquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryReleasegetExclusiveOwnerThread, setExclusiveOwnerThreadclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitchain, chain, duration, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, result, startTimepublic 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)
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 GridCacheMvccFuture<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 Collection<GridDhtCacheEntry> entriesCopy()
public IgniteUuid futureId()
futureId in interface GridCacheFuture<Boolean>public GridCacheVersion nearLockVersion()
@Nullable public GridCacheVersion mappedVersion()
mappedVersion in interface GridCacheMappedVersion@Nullable public 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)
t - Error.public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)
onOwnerChanged in interface GridCacheMvccFuture<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
Boolean success,
@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 Fabric : ver. 1.9.0 Release Date : March 2 2017