public class GridNearCacheEntry extends GridDistributedCacheEntry
GridMetadataAwareAdapter.EntryKey
ATOMIC_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,
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, txUnlock
candidate, candidate, checkObsolete, checkOwnerChanged, checkSerializableReadVersion, clear, clearReader, clearReaders, clearReserveForLoad, context, decrementMapPublicSize, deleted, deletedUnlocked, deletedUnlocked, detached, equals, evictInternal, expireTime, expireTimeExtras, expireTimeUnlocked, hashCode, hasLockCandidate, hasLockCandidate, hasLockCandidateUnsafe, hasReaders, hasValue, hasValueUnlocked, incrementMapPublicSize, info, initialValue, innerGet, innerGetAndReserveForLoad, innerGetVersioned, innerReload, innerRemove, innerSet, innerUpdate, innerUpdateLocal, invalidate, 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, nextPartCounter, 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, wrapVersioned
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, readExternalMeta, removeAllMeta, removeMeta, removeMeta, replaceMeta, writeExternalMeta
finalize, getClass, notify, notifyAll, wait, wait, wait
addMeta, hasMeta, meta, putMetaIfAbsent, removeMeta, removeMeta, replaceMeta
public 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 GridCacheEntryEx
memorySize
in class GridCacheMapEntry
IgniteCheckedException
- If failed.public int partition()
partition
in interface GridCacheEntryEx
partition
in class GridCacheMapEntry
public boolean isNear()
isNear
in interface GridCacheEntryEx
isNear
in class GridCacheMapEntry
True
if near.public boolean valid(AffinityTopologyVersion topVer)
valid
in interface GridCacheEntryEx
valid
in class GridCacheMapEntry
topVer
- 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 GridCacheMapEntry
primaryNodeId
- 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 GridCacheMapEntry
tx
- 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 GridCacheMapEntry
val
- Value.expireTime
- Expire time.ver
- New entry version.oldRow
- Old row if available.protected void removeValue()
removeValue
in class GridCacheMapEntry
protected void logUpdate(GridCacheOperation op, CacheObject val, GridCacheVersion ver, long expireTime, long updCntr) throws IgniteCheckedException
logUpdate
in class GridCacheMapEntry
op
- 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 GridCacheMapEntry
needVal
- 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 GridDistributedCacheEntry
threadId
- 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 GridDistributedCacheEntry
protected void onInvalidate()
onInvalidate
in class GridCacheMapEntry
protected boolean evictionDisabled()
evictionDisabled
in class GridCacheMapEntry
True
if this entry should not be evicted from cache.public String toString()
toString
in class GridDistributedCacheEntry
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017