public class GridNearCacheEntry extends GridDistributedCacheEntry
GridMetadataAwareAdapter.EntryKeyATOMIC_VER_COMPARATOR, cctx, flags, key, log, logRef, startVer, val, ver| Constructor and Description |
|---|
GridNearCacheEntry(GridCacheContext ctx,
KeyCacheObject key,
int hash,
CacheObject val) |
| Modifier and Type | Method and Description |
|---|---|
GridCacheMvccCandidate |
addLocal(long threadId,
GridCacheVersion ver,
AffinityTopologyVersion topVer,
long timeout,
boolean reenter,
boolean tx,
boolean implicitSingle)
Add local candidate.
|
GridCacheMvccCandidate |
addNearLocal(UUID dhtNodeId,
long threadId,
GridCacheVersion ver,
AffinityTopologyVersion topVer,
long timeout,
boolean reenter,
boolean tx,
boolean implicitSingle)
Add near local candidate.
|
protected void |
clearIndex(CacheObject val)
Clears index.
|
GridCacheMvccCandidate |
dhtNodeId(GridCacheVersion ver,
UUID dhtNodeId) |
GridCacheVersion |
dhtVersion() |
protected boolean |
evictionDisabled() |
void |
initializeFromDht(AffinityTopologyVersion topVer) |
boolean |
isNear() |
boolean |
loadedValue(IgniteInternalTx tx,
UUID primaryNodeId,
CacheObject val,
GridCacheVersion ver,
GridCacheVersion dhtVer,
long ttl,
long expireTime,
boolean evt,
boolean keepBinary,
AffinityTopologyVersion topVer,
UUID subjId) |
int |
memorySize() |
protected void |
onInvalidate()
Called when entry invalidated.
|
int |
partition() |
protected Object |
readThrough(IgniteInternalTx tx,
KeyCacheObject key,
boolean reload,
UUID subjId,
String taskName) |
boolean |
recordDhtVersion(GridCacheVersion dhtVer) |
protected void |
recordNodeId(UUID primaryNodeId,
AffinityTopologyVersion topVer) |
void |
releaseEviction() |
GridCacheMvccCandidate |
removeLock()
Unlocks local lock.
|
void |
reserveEviction() |
boolean |
resetFromPrimary(CacheObject val,
GridCacheVersion ver,
GridCacheVersion dhtVer,
UUID primaryNodeId,
AffinityTopologyVersion topVer)
This method should be called only when lock is owned on this entry.
|
String |
toString() |
protected void |
updateIndex(CacheObject val,
long expireTime,
GridCacheVersion ver,
CacheObject old)
Updates cache index.
|
void |
updateOrEvict(GridCacheVersion dhtVer,
CacheObject val,
long expireTime,
long ttl,
UUID primaryNodeId,
AffinityTopologyVersion topVer)
This method should be called only when lock is owned on this entry.
|
boolean |
valid(AffinityTopologyVersion topVer) |
IgniteBiTuple<GridCacheVersion,CacheObject> |
versionedValue() |
addRemote, addRemote, addRemoved, checkCallbacks, checkOwnerChanged, checkRemoved, checkThreadChain, doneRemote, doneRemote, orderCompleted, readyLock, readyNearLock, recheck, refreshRemotes, remoteMvccSnapshot, removeExplicitNodeLocks, removeLock, tmLock, txUnlockcandidate, candidate, checkObsolete, checkSerializableReadVersion, clear, clearReader, clearReaders, context, decrementMapPublicSize, deleted, deletedUnlocked, deletedUnlocked, detached, equals, evictInBatchInternal, evictInternal, expireTime, expireTimeExtras, expireTimeUnlocked, hashCode, hasLockCandidate, hasLockCandidate, hasLockCandidateUnsafe, hasOffHeapPointer, hasReaders, hasValue, hasValueUnlocked, incrementMapPublicSize, info, initialValue, initialValue, innerGet, innerGetVersioned, innerReload, innerRemove, innerSet, innerUpdate, innerUpdateLocal, invalidate, invalidate, isDht, isInternal, isLocal, 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, onMarkedObsolete, onOffheapEvict, onTtlExpired, onUnlock, partitionValid, peek, peek, peekVisibleValue, rawExpireTime, rawGet, rawGetOrUnmarshal, rawGetOrUnmarshalUnlocked, rawPut, rawTtl, releaseSwap, saveValueForIndexUnlocked, startVersion, ttl, ttlAndExpireTimeExtras, ttlExtras, txKey, unswap, unswap, update, updateTtl, updateTtl, 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 GridNearCacheEntry(GridCacheContext ctx, KeyCacheObject key, int hash, CacheObject val)
ctx - Cache context.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 isNear()
isNear in interface GridCacheEntryExisNear in class GridCacheMapEntryTrue if near.public boolean valid(AffinityTopologyVersion topVer)
valid in interface GridCacheEntryExvalid in class GridCacheMapEntrytopVer - Topology version where validation should be performed.
When negative the latest available topology should be used.public void initializeFromDht(AffinityTopologyVersion topVer) throws GridCacheEntryRemovedException
topVer - Topology version.GridCacheEntryRemovedException - If this entry is obsolete.public boolean resetFromPrimary(CacheObject val, GridCacheVersion ver, GridCacheVersion dhtVer, UUID primaryNodeId, AffinityTopologyVersion topVer) throws GridCacheEntryRemovedException
val - Value.ver - Version.dhtVer - DHT version.primaryNodeId - Primary node ID.topVer - Topology version.True if reset was done.GridCacheEntryRemovedException - If obsolete.public void updateOrEvict(GridCacheVersion dhtVer, @Nullable CacheObject val, long expireTime, long ttl, UUID primaryNodeId, AffinityTopologyVersion topVer)
dhtVer - DHT version.val - Value associated with version.expireTime - Expire time.ttl - Time to live.primaryNodeId - Primary node ID.topVer - Topology version.@Nullable public GridCacheVersion dhtVersion() throws GridCacheEntryRemovedException
GridCacheEntryRemovedException - If obsolete.@Nullable public IgniteBiTuple<GridCacheVersion,CacheObject> versionedValue() throws GridCacheEntryRemovedException
GridCacheEntryRemovedException - If entry has been removed.protected void recordNodeId(UUID primaryNodeId, AffinityTopologyVersion topVer)
recordNodeId in class GridCacheMapEntryprimaryNodeId - Node ID.public final boolean recordDhtVersion(GridCacheVersion dhtVer)
dhtVer - DHT version to record.False if given version is lower then existing version.protected Object readThrough(IgniteInternalTx tx, KeyCacheObject key, boolean reload, UUID subjId, String taskName) throws IgniteCheckedException
readThrough in class GridCacheMapEntrytx - Transaction.key - Key.reload - flag.subjId - Subject ID.taskName - Task name.IgniteCheckedException - If failed.public boolean loadedValue(@Nullable IgniteInternalTx tx, UUID primaryNodeId, CacheObject val, GridCacheVersion ver, GridCacheVersion dhtVer, long ttl, long expireTime, boolean evt, boolean keepBinary, AffinityTopologyVersion topVer, UUID subjId) throws IgniteCheckedException, GridCacheEntryRemovedException
tx - Transaction.primaryNodeId - Primary node ID.val - New value.ver - Version to use.dhtVer - DHT version received from remote node.ttl - Time to live.expireTime - Expiration time.evt - Event flag.topVer - Topology version.subjId - Subject ID.True if initial value was set.IgniteCheckedException - In case of error.GridCacheEntryRemovedException - If entry was removed.protected void updateIndex(CacheObject val, long expireTime, GridCacheVersion ver, CacheObject old) throws IgniteCheckedException
updateIndex in class GridCacheMapEntryval - Value.expireTime - Expire time.ver - New entry version.old - Previous value.IgniteCheckedException - If update failed.protected void clearIndex(CacheObject val)
clearIndex in class GridCacheMapEntryval - Previous value (if needed for index update).public GridCacheMvccCandidate addLocal(long threadId, GridCacheVersion ver, AffinityTopologyVersion topVer, long timeout, boolean reenter, boolean tx, boolean implicitSingle) throws GridCacheEntryRemovedException
addLocal in class GridDistributedCacheEntrythreadId - Owning thread ID.ver - Lock version.topVer - Topology version.timeout - Timeout to acquire lock.reenter - Reentry flag.tx - Transaction flag.implicitSingle - Implicit flag.GridCacheEntryRemovedException - If entry has been removed.@Nullable public GridCacheMvccCandidate addNearLocal(@Nullable UUID dhtNodeId, long threadId, GridCacheVersion ver, AffinityTopologyVersion topVer, long timeout, boolean reenter, boolean tx, boolean implicitSingle) throws GridCacheEntryRemovedException
dhtNodeId - DHT node ID.threadId - Owning thread ID.ver - Lock version.topVer - Topology version.timeout - Timeout to acquire lock.reenter - Reentry flag.tx - Transaction flag.implicitSingle - Implicit flag.GridCacheEntryRemovedException - If entry has been removed.@Nullable public GridCacheMvccCandidate dhtNodeId(GridCacheVersion ver, UUID dhtNodeId) throws GridCacheEntryRemovedException
ver - Version to set DHT node ID for.dhtNodeId - DHT node ID.true if candidate was found.GridCacheEntryRemovedException - If entry is removed.@Nullable public GridCacheMvccCandidate removeLock()
removeLock in class GridDistributedCacheEntryprotected void onInvalidate()
onInvalidate in class GridCacheMapEntrypublic void reserveEviction()
throws GridCacheEntryRemovedException
GridCacheEntryRemovedException - If entry was removed.public void releaseEviction()
protected boolean evictionDisabled()
evictionDisabled in class GridCacheMapEntryTrue if this entry should not be evicted from cache.public String toString()
toString in class GridDistributedCacheEntry
Follow @ApacheIgnite
Ignite Fabric : ver. 1.6.0 Release Date : May 18 2016