public class GridDhtCacheEntry extends GridDistributedCacheEntry
| Modifier and Type | Class and Description |
|---|---|
static class |
GridDhtCacheEntry.ReaderId
Reader ID.
|
GridMetadataAwareAdapter.EntryKeyATOMIC_VER_COMPARATOR, cctx, flags, key, log, logRef, startVer, val, ver| Constructor and Description |
|---|
GridDhtCacheEntry(GridCacheContext ctx,
AffinityTopologyVersion topVer,
KeyCacheObject key) |
| Modifier and Type | Method and Description |
|---|---|
IgniteInternalFuture<Boolean> |
addReader(UUID nodeId,
long msgId,
AffinityTopologyVersion topVer) |
protected String |
cacheName() |
Collection<GridDhtCacheEntry.ReaderId> |
checkReaders() |
protected Collection<GridDhtCacheEntry.ReaderId> |
checkReadersLocked() |
boolean |
clearInternal(GridCacheVersion ver,
GridCacheObsoleteEntryExtras extras)
Marks entry as obsolete and, if possible or required, removes it
from swap storage.
|
void |
clearReader(UUID nodeId) |
void |
clearReaders()
Clears all readers (usually when partition becomes invalid and ready for eviction).
|
protected void |
decrementMapPublicSize()
Decrements public size of map.
|
protected boolean |
hasReaders() |
protected void |
incrementMapPublicSize()
Increments public size of map.
|
boolean |
isDht() |
protected GridDhtLocalPartition |
localPartition() |
GridCacheMvccCandidate |
mappings(GridCacheVersion ver,
Collection<ClusterNode> dhtNodeIds,
Collection<ClusterNode> nearNodeIds)
Sets mappings into entry.
|
int |
memorySize() |
protected long |
nextPartitionCounter(AffinityTopologyVersion topVer,
boolean primary,
Long primaryCntr) |
void |
onMarkedObsolete()
This method should be called each time entry is marked obsolete
other than by calling
GridCacheEntryEx.markObsolete(GridCacheVersion). |
void |
onUnlock()
Calls
GridDhtLocalPartition.onUnlock() for this entry's partition. |
int |
partition() |
boolean |
partitionValid() |
GridDhtCacheEntry.ReaderId |
readerId(UUID nodeId) |
Collection<UUID> |
readers() |
GridDhtCacheEntry.ReaderId[] |
readersLocked() |
GridCacheMvccCandidate |
removeLock()
Unlocks local lock.
|
boolean |
removeLock(GridCacheVersion ver) |
void |
removeMapping(GridCacheVersion ver,
ClusterNode mappedNode) |
boolean |
removeReader(UUID nodeId,
long msgId) |
boolean |
tmLock(IgniteInternalTx tx,
long timeout,
GridCacheVersion serOrder,
GridCacheVersion serReadVer,
boolean read)
This locks is called by transaction manager during prepare step
for optimistic transactions.
|
String |
toString() |
IgniteBiTuple<GridCacheVersion,CacheObject> |
versionedValue(AffinityTopologyVersion topVer) |
addLocal, addRemote, addRemoved, checkCallbacks, checkRemoved, checkThreadChain, doneRemote, readyLock, readyNearLock, recheck, remoteMvccSnapshot, removeExplicitNodeLocks, txUnlockcandidate, candidate, checkObsolete, checkOwnerChanged, checkSerializableReadVersion, clear, clearReserveForLoad, context, deleted, deletedUnlocked, deletedUnlocked, detached, equals, evictInternal, evictionDisabled, expireTime, expireTimeExtras, expireTimeUnlocked, hashCode, hasLockCandidate, hasLockCandidate, hasLockCandidateUnsafe, hasValue, hasValueUnlocked, info, initialValue, innerGet, innerGetAndReserveForLoad, innerGetVersioned, innerReload, innerRemove, innerSet, innerUpdate, innerUpdateLocal, invalidate, isInternal, isLocal, isNear, isNew, isNewLocked, isReplicated, isStartVersion, key, keyValue, localCandidate, localCandidates, localOwner, lockedBy, lockedByAny, lockedByCurrentThread, lockedByThread, lockedByThread, lockedByThread, lockedByThreadUnsafe, lockedByUnsafe, lockedLocally, lockedLocallyByIdOrThread, lockedLocallyUnsafe, lockEntry, logTxUpdate, logUpdate, markObsolete, markObsolete0, markObsoleteIfEmpty, markObsoleteVersion, mvccAllLocal, mvccExtras, mvccExtras, obsolete, obsolete, obsoleteOrDeleted, obsoleteVersion, obsoleteVersionExtras, onInvalidate, onTtlExpired, onUpdateFinished, peek, peek, peekVisibleValue, rawExpireTime, rawGet, rawPut, rawTtl, readThrough, recordNodeId, removeValue, startVersion, storeValue, storeValue, ttl, ttlAndExpireTimeExtras, ttlExtras, txKey, unlockEntry, unswap, unswap, unswap, unswap, update, updateIndex, updateTtl, valid, value, valueBytes, valueBytes, valueBytes0, version, versionedEntry, versionedValue, visitable, wrap, wrapEviction, wrapLazyValue, wrapVersionedaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, readExternalMeta, removeAllMeta, removeMeta, removeMeta, replaceMeta, writeExternalMetafinalize, getClass, notify, notifyAll, wait, wait, waitaddMeta, hasMeta, meta, putMetaIfAbsent, removeMeta, removeMeta, replaceMetapublic GridDhtCacheEntry(GridCacheContext ctx, AffinityTopologyVersion topVer, KeyCacheObject key)
ctx - Cache context.topVer - Topology version at the time of creation (if negative, then latest topology is assumed).key - Cache key.protected long nextPartitionCounter(AffinityTopologyVersion topVer, boolean primary, @Nullable Long primaryCntr)
nextPartitionCounter in class GridCacheMapEntrytopVer - Topology version for current operation.primary - Primary node update flag.primaryCntr - Counter assigned on primary node.public int memorySize()
throws IgniteCheckedException
memorySize in interface GridCacheEntryExmemorySize in class GridCacheMapEntryIgniteCheckedException - If failed.public int partition()
partition in interface GridCacheEntryExpartition in class GridCacheMapEntryprotected GridDhtLocalPartition localPartition()
localPartition in class GridCacheMapEntrypublic boolean isDht()
isDht in interface GridCacheEntryExisDht in class GridCacheMapEntryTrue if DHT.public boolean partitionValid()
partitionValid in interface GridCacheEntryExpartitionValid in class GridCacheMapEntryTrue if partition is in valid.public void onMarkedObsolete()
GridCacheEntryEx.markObsolete(GridCacheVersion).onMarkedObsolete in interface GridCacheEntryExonMarkedObsolete in class GridCacheMapEntrypublic boolean tmLock(IgniteInternalTx tx, long timeout, @Nullable GridCacheVersion serOrder, GridCacheVersion serReadVer, boolean read) throws GridCacheEntryRemovedException, GridDistributedLockCancelledException
tmLock in interface GridCacheEntryExtmLock in class GridDistributedCacheEntrytx - 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.public GridCacheMvccCandidate removeLock()
removeLock in class GridDistributedCacheEntrypublic boolean removeLock(GridCacheVersion ver) throws GridCacheEntryRemovedException
removeLock in interface GridCacheEntryExremoveLock in class GridDistributedCacheEntryver - Removes lock.True If lock has been removed.GridCacheEntryRemovedException - If this entry has been removed from cache.public void onUnlock()
GridDhtLocalPartition.onUnlock() for this entry's partition.onUnlock in interface GridCacheEntryExonUnlock in class GridCacheMapEntry@Nullable public IgniteBiTuple<GridCacheVersion,CacheObject> versionedValue(AffinityTopologyVersion topVer) throws GridCacheEntryRemovedException
topVer - Topology version.null if entry is new.GridCacheEntryRemovedException - If entry has been removed.public Collection<UUID> readers() throws GridCacheEntryRemovedException
GridCacheEntryRemovedException - If removed.@Nullable public GridDhtCacheEntry.ReaderId readerId(UUID nodeId)
nodeId - Node ID.@Nullable public IgniteInternalFuture<Boolean> addReader(UUID nodeId, long msgId, AffinityTopologyVersion topVer) throws GridCacheEntryRemovedException
nodeId - Reader to add.msgId - Message ID.topVer - Topology version.null if reader was addedGridCacheEntryRemovedException - If entry was removed.public boolean removeReader(UUID nodeId, long msgId) throws GridCacheEntryRemovedException
nodeId - Reader to remove.msgId - Message ID.True if reader was removed as a result of this operation.GridCacheEntryRemovedException - If entry was removed.public void clearReaders()
clearReaders in class GridCacheMapEntrypublic void clearReader(UUID nodeId) throws GridCacheEntryRemovedException
clearReader in class GridCacheMapEntrynodeId - Node ID to clear.GridCacheEntryRemovedException - If removed.public boolean clearInternal(GridCacheVersion ver, GridCacheObsoleteEntryExtras extras) throws IgniteCheckedException
ver - Obsolete version.True if entry was not being used, passed the filter and could be removed.IgniteCheckedException - If failed to remove from swap.public Collection<GridDhtCacheEntry.ReaderId> checkReaders() throws GridCacheEntryRemovedException
GridCacheEntryRemovedException - If removed.@Nullable public GridDhtCacheEntry.ReaderId[] readersLocked()
protected Collection<GridDhtCacheEntry.ReaderId> checkReadersLocked() throws GridCacheEntryRemovedException
GridCacheEntryRemovedException - If removed.protected boolean hasReaders()
throws GridCacheEntryRemovedException
hasReaders in class GridCacheMapEntrytrue if entry has readers. It makes sense only for dht entry.GridCacheEntryRemovedException - If removed.@Nullable public GridCacheMvccCandidate mappings(GridCacheVersion ver, Collection<ClusterNode> dhtNodeIds, Collection<ClusterNode> nearNodeIds) throws GridCacheEntryRemovedException
ver - Version.null if candidate was not found.GridCacheEntryRemovedException - If removed.public void removeMapping(GridCacheVersion ver, ClusterNode mappedNode)
ver - Version.mappedNode - Mapped node to remove.protected final String cacheName()
public String toString()
toString in class GridDistributedCacheEntryprotected void incrementMapPublicSize()
incrementMapPublicSize in class GridCacheMapEntryprotected void decrementMapPublicSize()
decrementMapPublicSize in class GridCacheMapEntry
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018