Class GridDhtColocatedLockFuture
- java.lang.Object
-
- org.apache.ignite.internal.util.future.GridFutureAdapter<R>
-
- org.apache.ignite.internal.util.future.GridCompoundFuture<T,T>
-
- org.apache.ignite.internal.util.future.GridCompoundIdentityFuture<T>
-
- org.apache.ignite.internal.processors.cache.GridCacheCompoundIdentityFuture<Boolean>
-
- org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedLockFuture
-
- All Implemented Interfaces:
Serializable,IgniteDiagnosticAware,IgniteInternalFuture<Boolean>,GridCacheFuture<Boolean>,GridCacheVersionedFuture<Boolean>,IgniteInClosure<IgniteInternalFuture<Boolean>>
public final class GridDhtColocatedLockFuture extends GridCacheCompoundIdentityFuture<Boolean> implements GridCacheVersionedFuture<Boolean>, IgniteDiagnosticAware
Colocated cache lock future.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GridDhtColocatedLockFuture(GridCacheContext<?,?> cctx, Collection<KeyCacheObject> keys, @Nullable GridNearTxLocal tx, boolean read, boolean retval, long timeout, long createTtl, long accessTtl, boolean skipStore, boolean keepBinary, boolean recovery)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDiagnosticRequest(IgniteDiagnosticPrepareContext ctx)booleancancel()Cancellation has special meaning for lock futures.IgniteUuidfutureId()inthashCode()voidmarkNotTrackable()Marks this future as non-trackable.booleanonDone(Boolean success, Throwable err)Callback to notify that future is finished.booleanonNodeLeft(UUID nodeId)Callback for when node left.booleanonOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)Set<IgniteTxKey>requestedKeys()StringtoString()booleantrackable()GridCacheVersionversion()-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheCompoundIdentityFuture
duration, onDone, startTime
-
Methods inherited from class org.apache.ignite.internal.util.future.GridCompoundFuture
add, apply, 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, logger, onCancelled, onDone, onDone, onDone, reset, result
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, 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
chain, chain, chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, isCancelled, isDone, listen, listen, result
-
-
-
-
Constructor Detail
-
GridDhtColocatedLockFuture
public GridDhtColocatedLockFuture(GridCacheContext<?,?> cctx, Collection<KeyCacheObject> keys, @Nullable @Nullable GridNearTxLocal tx, boolean read, boolean retval, long timeout, long createTtl, long accessTtl, boolean skipStore, boolean keepBinary, boolean recovery)
- Parameters:
cctx- Registry.keys- Keys to lock.tx- Transaction.read- Read flag.retval- Flag to return value or not.timeout- Lock acquisition timeout.createTtl- TTL for create operation.accessTtl- TTL for read operation.skipStore- Skip store flag.
-
-
Method Detail
-
version
public GridCacheVersion version()
- Specified by:
versionin interfaceGridCacheVersionedFuture<Boolean>- Returns:
- Future version.
-
onOwnerChanged
public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)
- Specified by:
onOwnerChangedin interfaceGridCacheVersionedFuture<Boolean>- Parameters:
entry- Entry which received new owner.owner- Owner.- Returns:
Trueif future cares about this entry.
-
futureId
public IgniteUuid futureId()
- Specified by:
futureIdin interfaceGridCacheFuture<Boolean>- Returns:
- Future ID.
-
trackable
public boolean trackable()
- Specified by:
trackablein interfaceGridCacheFuture<Boolean>- Returns:
Trueif future should be tracked.
-
markNotTrackable
public void markNotTrackable()
Marks this future as non-trackable.- Specified by:
markNotTrackablein interfaceGridCacheFuture<Boolean>
-
onNodeLeft
public boolean onNodeLeft(UUID nodeId)
Description copied from interface:GridCacheFutureCallback for when node left.- Specified by:
onNodeLeftin interfaceGridCacheFuture<Boolean>- Parameters:
nodeId- Left node ID- Returns:
Trueif node was in the list.
-
requestedKeys
public Set<IgniteTxKey> requestedKeys()
- Returns:
- Keys for which locks requested from remote nodes but response isn't received.
-
cancel
public boolean cancel()
Cancellation has special meaning for lock futures. It's called then lock must be released on rollback.- Specified by:
cancelin interfaceIgniteInternalFuture<Boolean>- Overrides:
cancelin classGridCompoundFuture<Boolean,Boolean>- Returns:
Trueif future was canceled (i.e. was not finished prior to this call).
-
onDone
public boolean onDone(Boolean success, 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<Boolean>- Parameters:
success- Optional result.err- Optional error.- Returns:
Trueif result was set by this call.
-
addDiagnosticRequest
public void addDiagnosticRequest(IgniteDiagnosticPrepareContext ctx)
- Specified by:
addDiagnosticRequestin interfaceIgniteDiagnosticAware- Parameters:
ctx- Context.
-
toString
public String toString()
- Overrides:
toStringin classGridCompoundIdentityFuture<Boolean>
-
-