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) |
| Modifier and Type | Method and Description |
|---|---|
GridCacheMvccCandidate |
addLocal(long threadId,
GridCacheVersion ver,
AffinityTopologyVersion topVer,
long timeout,
boolean reenter,
boolean tx,
boolean implicitSingle,
boolean read)
Add local candidate.
|
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) |
protected void |
logUpdate(GridCacheOperation op,
CacheObject val,
GridCacheVersion ver,
long expireTime,
long updCntr) |
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) |
GridCacheMvccCandidate |
removeLock()
Unlocks local lock.
|
protected void |
removeValue()
Removes value from offheap.
|
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.
|
protected void |
storeValue(CacheObject val,
long expireTime,
GridCacheVersion ver,
CacheDataRow oldRow)
Stores value in offheap.
|
String |
toString() |
CacheDataRow |
unswap(boolean needVal,
boolean checkExpire)
Unswaps an entry.
|
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, addRemoved, checkCallbacks, checkRemoved, checkThreadChain, doneRemote, readyLock, readyNearLock, recheck, remoteMvccSnapshot, removeExplicitNodeLocks, removeLock, tmLock, txUnlockcandidate, candidate, checkObsolete, checkOwnerChanged, checkSerializableReadVersion, clear, clearReader, clearReaders, clearReserveForLoad, context, decrementMapPublicSize, deleted, deletedUnlocked, deletedUnlocked, detached, ensureIndexed, equals, evictInternal, 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, isNew, isNewLocked, isReplicated, isStartVersion, key, keyValue, localCandidate, localCandidates, localOwner, localPartition, lockedBy, lockedByAny, lockedByThread, lockedByThread, lockedByThread, lockedByThreadUnsafe, lockedByUnsafe, lockedLocally, lockedLocallyByIdOrThread, lockedLocallyUnsafe, markObsolete, markObsolete0, markObsoleteIfEmpty, markObsoleteVersion, mvccAllLocal, mvccExtras, mvccExtras, nextPartitionCounter, obsolete, obsolete, obsoleteOrDeleted, obsoleteVersion, obsoleteVersionExtras, onMarkedObsolete, onTtlExpired, onUnlock, onUpdateFinished, partitionValid, peek, peek, peekVisibleValue, rawExpireTime, rawGet, rawPut, rawTtl, startVersion, ttl, ttlAndExpireTimeExtras, ttlExtras, txKey, unswap, unswap, update, updateIndex, updateTtl, 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 GridNearCacheEntry(GridCacheContext ctx, KeyCacheObject key)
ctx - Cache context.key - Cache key.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 storeValue(CacheObject val, long expireTime, GridCacheVersion ver, CacheDataRow oldRow)
storeValue in class GridCacheMapEntryval - Value.expireTime - Expire time.ver - New entry version.oldRow - Old row if available.protected void removeValue()
removeValue in class GridCacheMapEntryprotected void logUpdate(GridCacheOperation op, CacheObject val, GridCacheVersion ver, long expireTime, long updCntr) throws IgniteCheckedException
logUpdate in class GridCacheMapEntryop - Update operation.val - Write value.ver - Write version.expireTime - Expire time.updCntr - Update counter.IgniteCheckedException@Nullable public CacheDataRow unswap(boolean needVal, boolean checkExpire)
unswap in class GridCacheMapEntryneedVal - If false then do not to deserialize value during unswap.checkExpire - If true checks for expiration, as result entry can be obsoleted or marked deleted.public GridCacheMvccCandidate addLocal(long threadId, GridCacheVersion ver, AffinityTopologyVersion topVer, long timeout, boolean reenter, boolean tx, boolean implicitSingle, boolean read) 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.read - Read lock 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 GridCacheMapEntryprotected 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. 2.1.0 Release Date : July 20 2017