public class GridDhtCacheEntry<K,V> extends GridDistributedCacheEntry<K,V>
| Constructor and Description |
|---|
GridDhtCacheEntry(GridCacheContext<K,V> ctx,
long topVer,
K key,
int hash,
V val,
GridCacheMapEntry<K,V> next,
long ttl,
int hdrId) |
| Modifier and Type | Method and Description |
|---|---|
GridCacheMvccCandidate<K> |
addDhtLocal(UUID nearNodeId,
GridCacheVersion nearVer,
long topVer,
long threadId,
GridCacheVersion ver,
long timeout,
boolean reenter,
boolean tx,
boolean implicitSingle)
Add local candidate.
|
IgniteInternalFuture<Boolean> |
addReader(UUID nodeId,
long msgId,
long topVer) |
protected String |
cacheName() |
Collection<org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry.ReaderId<K,V>> |
checkReaders() |
boolean |
clearInternal(GridCacheVersion ver,
boolean swap)
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 boolean |
hasReaders() |
boolean |
isDht() |
GridCacheMvccCandidate<K> |
localCandidateByNearVersion(GridCacheVersion nearVer,
boolean rmv) |
GridCacheMvccCandidate<K> |
mappings(GridCacheVersion ver)
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<K,V> |
readerId(UUID nodeId) |
Collection<UUID> |
readers() |
GridCacheMvccCandidate<K> |
removeLock()
Unlocks local lock.
|
boolean |
removeLock(GridCacheVersion ver) |
boolean |
removeReader(UUID nodeId,
long msgId) |
boolean |
tmLock(IgniteInternalTx<K,V> tx,
long timeout)
This locks is called by transaction manager during prepare step
for optimistic transactions.
|
String |
toString() |
GridTuple3<GridCacheVersion,V,byte[]> |
versionedValue(long topVer) |
addLocal, addRemote, addRemote, addRemoved, checkCallbacks, checkOwnerChanged, checkRemoved, checkThreadChain, doneRemote, doneRemote, orderCompleted, readyLock, readyNearLock, recheck, refreshRemotes, remoteMvccSnapshot, removeExplicitNodeLocks, txUnlockaddMeta, candidate, candidate, checkObsolete, clear, clearIndex, compact, context, deleted, deletedUnlocked, deletedUnlocked, detached, equals, evictInBatchInternal, evictInternal, expireTime, expireTimeExtras, expireTimeUnlocked, getOrMarshalKeyBytes, hashCode, hasLockCandidate, hasLockCandidate, hasLockCandidateUnsafe, hasMeta, hasValue, hasValueUnlocked, info, initialValue, initialValue, innerGet, innerReload, innerRemove, innerSet, innerUpdate, innerUpdateLocal, invalidate, invalidate, isInternal, isLocal, isNear, isNew, isNewLocked, isOffHeapValuesOnly, isReplicated, isStartVersion, isStoreValueBytes, key, keyBytes, keyBytes, localCandidate, localCandidates, localOwner, lockedBy, lockedByAny, lockedByThread, lockedByThread, lockedByThread, lockedByThreadUnsafe, lockedByUnsafe, lockedLocally, lockedLocallyByIdOrThread, lockedLocallyUnsafe, markObsolete, markObsolete0, markObsoleteIfEmpty, markObsoleteVersion, meta, mvccExtras, mvccExtras, obsolete, obsolete, obsoleteOrDeleted, obsoleteVersion, obsoleteVersionExtras, obsoleteVersionExtras, onInvalidate, onTtlExpired, peek, peek, peek, peek0, peekFailFast, poke, putMetaIfAbsent, putMetaIfAbsent, rawExpireTime, rawGet, rawGetOrUnmarshal, rawGetOrUnmarshalUnlocked, rawPut, rawTtl, readExternalMeta, readThrough, recordNodeId, releaseSwap, removeMeta, removeMeta, replaceMeta, saveValueForIndexUnlocked, startVersion, toExpireTime, ttl, ttlAndExpireTimeExtras, ttlExtras, txKey, unswap, unswap, update, updateIndex, updateTtl, valid, value, valueBytes, valueBytes, valueBytesUnlocked, version, versionedEntry, versionedValue, visitable, wrap, wrapEviction, wrapFilterLocked, wrapLazyValue, wrapVersioned, writeExternalMetapublic GridDhtCacheEntry(GridCacheContext<K,V> ctx, long topVer, K key, int hash, V val, GridCacheMapEntry<K,V> next, long ttl, int hdrId)
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.next - Next entry in the linked list.ttl - Time to live.hdrId - Header id.public int memorySize()
throws IgniteCheckedException
memorySize in interface GridCacheEntryEx<K,V>memorySize in class GridCacheMapEntry<K,V>IgniteCheckedException - If failed.public int partition()
partition in interface GridCacheEntryEx<K,V>partition in class GridCacheMapEntry<K,V>public boolean isDht()
isDht in interface GridCacheEntryEx<K,V>isDht in class GridCacheMapEntry<K,V>True if DHT.public boolean partitionValid()
partitionValid in interface GridCacheEntryEx<K,V>partitionValid in class GridCacheMapEntry<K,V>True if partition is in valid.public void onMarkedObsolete()
GridCacheEntryEx.markObsolete(GridCacheVersion).onMarkedObsolete in interface GridCacheEntryEx<K,V>onMarkedObsolete in class GridCacheMapEntry<K,V>@Nullable public GridCacheMvccCandidate<K> 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<K> addDhtLocal(UUID nearNodeId, GridCacheVersion nearVer, long topVer, long threadId, GridCacheVersion ver, 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.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<K,V> tx, long timeout) throws GridCacheEntryRemovedException, GridDistributedLockCancelledException
tmLock in interface GridCacheEntryEx<K,V>tmLock in class GridDistributedCacheEntry<K,V>tx - Cache transaction.timeout - Timeout for lock acquisition.True if lock was acquired, false otherwise.GridCacheEntryRemovedException - If this entry is obsolete.GridDistributedLockCancelledException - If lock has been cancelled.public GridCacheMvccCandidate<K> removeLock()
removeLock in class GridDistributedCacheEntry<K,V>public boolean removeLock(GridCacheVersion ver) throws GridCacheEntryRemovedException
removeLock in interface GridCacheEntryEx<K,V>removeLock in class GridDistributedCacheEntry<K,V>ver - 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.@Nullable public GridTuple3<GridCacheVersion,V,byte[]> versionedValue(long 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<K,V> readerId(UUID nodeId)
nodeId - Node ID.@Nullable public IgniteInternalFuture<Boolean> addReader(UUID nodeId, long msgId, long 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 GridCacheMapEntry<K,V>public void clearReader(UUID nodeId) throws GridCacheEntryRemovedException
clearReader in class GridCacheMapEntry<K,V>nodeId - Node ID to clear.GridCacheEntryRemovedExceptionpublic boolean clearInternal(GridCacheVersion ver, boolean swap) 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<K,V>> checkReaders() throws GridCacheEntryRemovedException
GridCacheEntryRemovedException - If removed.protected boolean hasReaders()
throws GridCacheEntryRemovedException
hasReaders in class GridCacheMapEntry<K,V>true if entry has readers. It makes sense only for dht entry.GridCacheEntryRemovedException - If removed.@Nullable public GridCacheMvccCandidate<K> mappings(GridCacheVersion ver) throws GridCacheEntryRemovedException
ver - Version.null if candidate was not found.GridCacheEntryRemovedException - If removed.protected String cacheName()
public String toString()
toString in class GridDistributedCacheEntry<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 17 2015