public class GridDistributedCacheEntry extends GridCacheMapEntry
GridMetadataAwareAdapter.EntryKeyATOMIC_VER_COMPARATOR, cctx, DFLT_LOCK_TIMEOUT_ENV, ENTRY_LOCK_TIMEOUT_ENV, flags, key, log, logRef, val, ver| Constructor and Description |
|---|
GridDistributedCacheEntry(GridCacheContext ctx,
KeyCacheObject key) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable GridCacheMvccCandidate |
addLocal(long threadId,
GridCacheVersion ver,
AffinityTopologyVersion topVer,
long timeout,
boolean reenter,
boolean tx,
boolean implicitSingle,
boolean read)
Add local candidate.
|
void |
addRemote(UUID nodeId,
@Nullable UUID otherNodeId,
long threadId,
GridCacheVersion ver,
boolean tx,
boolean implicitSingle,
@Nullable GridCacheVersion owned)
Adds new lock candidate.
|
boolean |
addRemoved(GridCacheVersion ver) |
protected void |
checkCallbacks(boolean emptyBefore,
boolean emptyAfter) |
protected void |
checkRemoved(GridCacheVersion ver) |
protected void |
checkThreadChain(GridCacheMvccCandidate owner) |
void |
doneRemote(GridCacheVersion lockVer,
GridCacheVersion baseVer,
@Nullable Collection<GridCacheVersion> pendingVers,
Collection<GridCacheVersion> committedVers,
Collection<GridCacheVersion> rolledbackVers,
boolean sysInvalidate) |
@Nullable CacheLockCandidates |
readyLock(GridCacheVersion ver) |
void |
readyNearLock(GridCacheVersion ver,
GridCacheVersion mapped,
Collection<GridCacheVersion> committed,
Collection<GridCacheVersion> rolledBack,
Collection<GridCacheVersion> pending)
Notifies mvcc that near local lock is ready to be acquired.
|
boolean |
recheck(GridCacheVersion ver)
Rechecks if lock should be reassigned.
|
Collection<GridCacheMvccCandidate> |
remoteMvccSnapshot(GridCacheVersion... exclude)
Gets all remote versions.
|
void |
removeExplicitNodeLocks(UUID nodeId)
Removes all lock candidates for node.
|
@Nullable GridCacheMvccCandidate |
removeLock()
Unlocks local lock.
|
boolean |
removeLock(GridCacheVersion ver) |
boolean |
tmLock(IgniteInternalTx tx,
long timeout,
@Nullable GridCacheVersion serOrder,
GridCacheVersion serReadVer,
boolean read)
This locks is called by transaction manager during prepare step
for optimistic transactions.
|
String |
toString() |
allVersionsInfo, candidate, candidate, checkObsolete, checkOwnerChanged, checkOwnerChanged, checkSerializableReadVersion, clear, clearReader, clearReaders, clearReserveForLoad, context, decrementMapPublicSize, deleted, deletedUnlocked, deletedUnlocked, detached, equals, evictInternal, evictionDisabled, expireTime, expireTimeExtras, expireTimeUnlocked, hashCode, hasLockCandidate, hasLockCandidate, hasLockCandidateUnsafe, hasReaders, hasValue, hasValueUnlocked, incrementMapPublicSize, info, initialValue, innerGet, innerGetAndReserveForLoad, innerGetVersioned, innerReload, innerRemove, innerSet, innerUpdate, innerUpdateLocal, invalidate, isDht, isInternal, isLocal, isMvcc, isNear, isNew, isNewLocked, isReplicated, isStartVersion, key, keyValue, localCandidate, localCandidates, localOwner, localPartition, lockedBy, lockedByAny, lockedByCurrentThread, lockedByThread, lockedByThread, lockedByThread, lockedByThreadUnsafe, lockedByUnsafe, lockedLocally, lockedLocallyByIdOrThread, lockedLocallyUnsafe, lockEntry, logMvccUpdate, logTxUpdate, logUpdate, markObsolete, markObsolete0, markObsoleteIfEmpty, markObsoleteVersion, memorySize, mvccAllLocal, mvccExtras, mvccExtras, mvccLock, mvccPeek, mvccPreloadEntry, mvccRemove, mvccSet, mvccUpdateRowsWithPreloadInfo, nextPartitionCounter, nextPartitionCounter, obsolete, obsolete, obsoleteOrDeleted, obsoleteVersion, obsoleteVersionExtras, onInvalidate, onMarkedObsolete, onTtlExpired, onUnlock, onUpdateFinished, partition, partitionValid, peek, peek, peekVisibleValue, rawExpireTime, rawGet, rawPut, rawTtl, readThrough, recordNodeId, removeValue, storeValue, storeValue, toStringWithTryLock, touch, tryLockEntry, ttl, ttlAndExpireTimeExtras, ttlExtras, txKey, txUnlock, unlockEntry, unswap, unswap, unswap, unswap, update, updateIndex, updatePlatformCache, updateTtl, valid, value, valueBytes, valueBytes, valueBytes0, version, versionedEntry, versionedValue, visitable, wrap, wrapEviction, wrapLazyValue, wrapVersionedaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, removeAllMeta, removeMeta, removeMeta, replaceMetafinalize, getClass, notify, notifyAll, wait, wait, waitaddMeta, hasMeta, initialValue, initialValue, meta, putMetaIfAbsent, removeMeta, removeMeta, replaceMetapublic GridDistributedCacheEntry(GridCacheContext ctx, KeyCacheObject key)
ctx - Cache context.key - Cache key.@Nullable public @Nullable GridCacheMvccCandidate addLocal(long threadId, GridCacheVersion ver, AffinityTopologyVersion topVer, long timeout, boolean reenter, boolean tx, boolean implicitSingle, boolean read) throws GridCacheEntryRemovedException
threadId - Owning thread ID.ver - Lock version.topVer - Topology version.timeout - Timeout to acquire lock.reenter - Reentry flag.tx - Transaction flag.implicitSingle - Implicit flag.read - Read lock flag.GridCacheEntryRemovedException - If entry has been removed.public Collection<GridCacheMvccCandidate> remoteMvccSnapshot(GridCacheVersion... exclude)
remoteMvccSnapshot in interface GridCacheEntryExremoteMvccSnapshot in class GridCacheMapEntryexclude - Exclude version.public void addRemote(UUID nodeId, @Nullable @Nullable UUID otherNodeId, long threadId, GridCacheVersion ver, boolean tx, boolean implicitSingle, @Nullable @Nullable GridCacheVersion owned) throws GridDistributedLockCancelledException, GridCacheEntryRemovedException
nodeId - Node ID.otherNodeId - Other node ID.threadId - Thread ID.ver - Lock version.tx - Transaction flag.implicitSingle - Implicit flag.owned - Owned candidate version.GridDistributedLockCancelledException - If lock has been canceled.GridCacheEntryRemovedException - If this entry is obsolete.public void removeExplicitNodeLocks(UUID nodeId) throws GridCacheEntryRemovedException
nodeId - ID of node to remove locks from.GridCacheEntryRemovedException - If entry was removed.@Nullable public @Nullable GridCacheMvccCandidate removeLock()
public boolean removeLock(GridCacheVersion ver) throws GridCacheEntryRemovedException
ver - Removes lock.True If lock has been removed.GridCacheEntryRemovedException - If this entry has been removed from cache.protected void checkRemoved(GridCacheVersion ver) throws GridDistributedLockCancelledException
ver - Lock version.GridDistributedLockCancelledException - If lock is cancelled.public boolean addRemoved(GridCacheVersion ver)
ver - Lock version.True if removed.@Nullable public @Nullable CacheLockCandidates readyLock(GridCacheVersion ver) throws GridCacheEntryRemovedException
ver - Version of candidate to acquire lock for.GridCacheEntryRemovedException - If entry is removed.public void readyNearLock(GridCacheVersion ver, GridCacheVersion mapped, Collection<GridCacheVersion> committed, Collection<GridCacheVersion> rolledBack, Collection<GridCacheVersion> pending) throws GridCacheEntryRemovedException
ver - Lock version.mapped - Mapped dht lock version.committed - Committed versions.rolledBack - Rolled back versions.pending - Pending locks on dht node with version less then mapped.GridCacheEntryRemovedException - If entry is removed.public void doneRemote(GridCacheVersion lockVer, GridCacheVersion baseVer, @Nullable @Nullable Collection<GridCacheVersion> pendingVers, Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers, boolean sysInvalidate) throws GridCacheEntryRemovedException
lockVer - Done version.baseVer - Base version.pendingVers - Pending versions that are less than lock version.committedVers - Completed versions for reordering.rolledbackVers - Rolled back versions for reordering.sysInvalidate - Flag indicating if this entry is done from invalidated transaction (in case of tx
salvage). In this case all locks before salvaged lock will marked as used and corresponding
transactions will be invalidated.GridCacheEntryRemovedException - If entry has been removed.public boolean recheck(GridCacheVersion ver)
ver - Thread chain version.True if thread chain processing must be stopped.public boolean tmLock(IgniteInternalTx tx, long timeout, @Nullable @Nullable GridCacheVersion serOrder, GridCacheVersion serReadVer, boolean read) throws GridCacheEntryRemovedException, GridDistributedLockCancelledException
tx - Cache transaction.timeout - Timeout for lock acquisition.serOrder - Version for serializable transactions ordering.serReadVer - Optional read entry version for optimistic serializable transaction.read - Read lock flag.True if lock was acquired, false otherwise.GridCacheEntryRemovedException - If this entry is obsolete.GridDistributedLockCancelledException - If lock has been cancelled.protected void checkCallbacks(boolean emptyBefore,
boolean emptyAfter)
emptyBefore - Empty flag before operation.emptyAfter - Empty flag after operation.protected final void checkThreadChain(GridCacheMvccCandidate owner)
checkThreadChain in class GridCacheMapEntryowner - Starting candidate in the chain.public String toString()
toString in class GridCacheMapEntry
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021