public class GridDhtCacheEntry extends GridDistributedCacheEntry
GridMetadataAwareAdapter.EntryKeyATOMIC_VER_COMPARATOR, cctx, flags, key, log, logRef, startVer, val, ver| Constructor and Description |
|---|
GridDhtCacheEntry(GridCacheContext ctx,
AffinityTopologyVersion topVer,
KeyCacheObject key,
int hash,
CacheObject val) |
| Modifier and Type | Method and Description |
|---|---|
GridCacheMvccCandidate |
addDhtLocal(UUID nearNodeId,
GridCacheVersion nearVer,
AffinityTopologyVersion topVer,
long threadId,
GridCacheVersion ver,
GridCacheVersion serOrder,
GridCacheVersion serReadVer,
long timeout,
boolean reenter,
boolean tx,
boolean implicitSingle)
Add local candidate.
|
IgniteInternalFuture<Boolean> |
addReader(UUID nodeId,
long msgId,
AffinityTopologyVersion topVer) |
protected String |
cacheName() |
Collection<org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry.ReaderId> |
checkReaders() |
protected Collection<org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry.ReaderId> |
checkReadersLocked() |
boolean |
clearInternal(GridCacheVersion ver,
boolean swap,
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() |
GridCacheMvccCandidate |
localCandidateByNearVersion(GridCacheVersion nearVer,
boolean rmv) |
GridCacheMvccCandidate |
mappings(GridCacheVersion ver,
Collection<ClusterNode> dhtNodeIds,
Collection<ClusterNode> nearNodeIds)
Sets mappings into entry.
|
int |
memorySize() |
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() |
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry.ReaderId |
readerId(UUID nodeId) |
Collection<UUID> |
readers() |
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 keepBinary)
This locks is called by transaction manager during prepare step
for optimistic transactions.
|
String |
toString() |
IgniteBiTuple<GridCacheVersion,CacheObject> |
versionedValue(AffinityTopologyVersion topVer) |
addLocal, addRemote, addRemote, addRemoved, checkCallbacks, checkOwnerChanged, checkRemoved, checkThreadChain, doneRemote, doneRemote, orderCompleted, readyLock, readyNearLock, recheck, refreshRemotes, remoteMvccSnapshot, removeExplicitNodeLocks, txUnlockcandidate, candidate, checkObsolete, checkSerializableReadVersion, clear, clearIndex, context, deleted, deletedUnlocked, deletedUnlocked, detached, equals, evictInBatchInternal, evictInternal, evictionDisabled, expireTime, expireTimeExtras, expireTimeUnlocked, hashCode, hasLockCandidate, hasLockCandidate, hasLockCandidateUnsafe, hasOffHeapPointer, hasValue, hasValueUnlocked, info, initialValue, initialValue, innerGet, innerGetVersioned, innerReload, innerRemove, innerSet, innerUpdate, innerUpdateLocal, invalidate, invalidate, isInternal, isLocal, isNear, isNew, isNewLocked, isOffHeapValuesOnly, isReplicated, isStartVersion, key, keyValue, localCandidate, localCandidates, localOwner, lockedBy, lockedByAny, lockedByThread, lockedByThread, lockedByThread, lockedByThreadUnsafe, lockedByUnsafe, lockedLocally, lockedLocallyByIdOrThread, lockedLocallyUnsafe, markObsolete, markObsolete0, markObsoleteIfEmpty, markObsoleteVersion, mvccAllLocal, mvccExtras, mvccExtras, obsolete, obsolete, obsoleteOrDeleted, obsoleteVersion, obsoleteVersionExtras, obsoleteVersionExtras, offHeapPointer, offHeapPointer, onInvalidate, onOffheapEvict, onTtlExpired, peek, peek, peekVisibleValue, rawExpireTime, rawGet, rawGetOrUnmarshal, rawGetOrUnmarshalUnlocked, rawPut, rawTtl, readThrough, recordNodeId, releaseSwap, saveValueForIndexUnlocked, startVersion, ttl, ttlAndExpireTimeExtras, ttlExtras, txKey, unswap, unswap, update, updateIndex, updateTtl, updateTtl, valid, value, valueBytes, valueBytes, valueBytes0, valueBytesUnlocked, 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, int hash, CacheObject val)
ctx - Cache context.topVer - Topology version at the time of creation (if negative, then latest topology is assumed).key - Cache key.hash - Key hash value.val - Entry value.public int memorySize()
throws IgniteCheckedException
memorySize in interface GridCacheEntryExmemorySize in class GridCacheMapEntryIgniteCheckedException - If failed.public int partition()
partition in interface GridCacheEntryExpartition 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 GridCacheMapEntry@Nullable public GridCacheMvccCandidate localCandidateByNearVersion(GridCacheVersion nearVer, boolean rmv) throws GridCacheEntryRemovedException
nearVer - Near version.rmv - If true, then add to removed list if not found.GridCacheEntryRemovedException - If removed.@Nullable public GridCacheMvccCandidate addDhtLocal(UUID nearNodeId, GridCacheVersion nearVer, AffinityTopologyVersion topVer, long threadId, GridCacheVersion ver, @Nullable GridCacheVersion serOrder, @Nullable GridCacheVersion serReadVer, long timeout, boolean reenter, boolean tx, boolean implicitSingle) throws GridCacheEntryRemovedException, GridDistributedLockCancelledException
nearNodeId - Near node ID.nearVer - Near version.topVer - Topology version.threadId - Owning thread ID.ver - Lock version.serOrder - Version for serializable transactions ordering.serReadVer - Optional read entry version for optimistic serializable transaction.timeout - Timeout to acquire lock.reenter - Reentry flag.tx - Tx flag.implicitSingle - Implicit flag.GridCacheEntryRemovedException - If entry has been removed.GridDistributedLockCancelledException - If lock was cancelled.public boolean tmLock(IgniteInternalTx tx, long timeout, @Nullable GridCacheVersion serOrder, GridCacheVersion serReadVer, boolean keepBinary) 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.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 org.apache.ignite.internal.processors.cache.distributed.dht.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, boolean swap, GridCacheObsoleteEntryExtras extras) throws IgniteCheckedException
ver - Obsolete version.swap - If true then remove from swap.True if entry was not being used, passed the filter and could be removed.IgniteCheckedException - If failed to remove from swap.public Collection<org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry.ReaderId> checkReaders() throws GridCacheEntryRemovedException
GridCacheEntryRemovedException - If removed.protected Collection<org.apache.ignite.internal.processors.cache.distributed.dht.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 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. 1.6.0 Release Date : May 18 2016