Class GridDhtDetachedCacheEntry
- java.lang.Object
-
- org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter
-
- org.apache.ignite.internal.processors.cache.GridCacheMapEntry
-
- org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheEntry
-
- org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtDetachedCacheEntry
-
- All Implemented Interfaces:
GridCacheEntryEx
public class GridDhtDetachedCacheEntry extends GridDistributedCacheEntry
Detached cache entry.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter
GridMetadataAwareAdapter.EntryKey
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheMapEntry
ATOMIC_VER_COMPARATOR, cctx, DFLT_LOCK_TIMEOUT_ENV, ENTRY_LOCK_TIMEOUT_ENV, flags, key, log, logRef, val, ver
-
-
Constructor Summary
Constructors Constructor Description GridDhtDetachedCacheEntry(GridCacheContext ctx, KeyCacheObject key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddRemoved(GridCacheVersion ver)booleandetached()protected WALPointerlogTxUpdate(IgniteInternalTx tx, CacheObject val, GridCacheVersion writeVer, long expireTime, long updCntr)protected voidlogUpdate(GridCacheOperation op, CacheObject val, GridCacheVersion writeVer, long expireTime, long updCntr, boolean primary)intpartition()protected voidremoveValue()Removes value from offheap.voidresetFromPrimary(CacheObject val, GridCacheVersion ver)Sets value to detached entry so it can be retrieved in transactional gets.protected booleanstoreValue(CacheObject val, long expireTime, GridCacheVersion ver)Stores value in offheap.StringtoString()@Nullable CacheDataRowunswap(CacheDataRow row, boolean checkExpire)Unswaps an entry.protected voidvalue(@Nullable CacheObject val)Sets entry value.-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheEntry
addLocal, addRemote, checkCallbacks, checkRemoved, checkThreadChain, doneRemote, readyLock, readyNearLock, recheck, remoteMvccSnapshot, removeExplicitNodeLocks, removeLock, removeLock, tmLock
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMapEntry
candidate, candidate, checkObsolete, checkOwnerChanged, checkOwnerChanged, checkSerializableReadVersion, clear, clearReader, clearReaders, clearReserveForLoad, context, decrementMapPublicSize, deleted, deletedUnlocked, deletedUnlocked, equals, evictInternal, evictionDisabled, expireTime, expireTimeExtras, expireTimeUnlocked, hashCode, hasLockCandidate, hasLockCandidate, hasLockCandidateUnsafe, hasReaders, hasValue, hasValueUnlocked, incrementMapPublicSize, info, initialValue, innerGet, innerGetAndReserveForLoad, innerGetVersioned, innerReload, innerRemove, innerSet, innerUpdate, invalidate, isDht, isInternal, isLocal, isNear, isNew, isNewLocked, isReplicated, isStartVersion, key, keyValue, localCandidate, localCandidates, localOwner, localPartition, lockedBy, lockedByAny, lockedByCurrentThread, lockedByThread, lockedByThread, lockedByThread, lockedByThreadUnsafe, lockedByUnsafe, lockedLocally, lockedLocallyByIdOrThread, lockedLocallyUnsafe, lockEntry, markObsolete, markObsolete0, markObsoleteIfEmpty, markObsoleteVersion, memorySize, mvccAllLocal, mvccExtras, mvccExtras, nextPartitionCounter, nextPartitionCounter, obsolete, obsolete, obsoleteOrDeleted, obsoleteVersion, obsoleteVersionExtras, onInvalidate, onMarkedObsolete, onTtlExpired, onUnlock, onUpdateFinished, partitionValid, peek, peek, peekVisibleValue, rawExpireTime, rawGet, rawPut, rawTtl, readThrough, recordNodeId, storeValue, toStringWithTryLock, touch, tryLockEntry, ttl, ttlAndExpireTimeExtras, ttlExtras, txKey, txUnlock, unlockEntry, unswap, unswap, unswap, update, updateIndex, updatePlatformCache, updateTtl, updateTtl, valid, valueBytes, valueBytes, valueBytes0, version, versionedEntry, versionedValue, visitable, wrap, wrapEviction, wrapLazyValue, wrapVersioned
-
Methods inherited from class org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, removeAllMeta, removeMeta, removeMeta, replaceMeta
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheEntryEx
addMeta, hasMeta, initialValue, meta, putMetaIfAbsent, removeMeta, removeMeta, replaceMeta
-
-
-
-
Constructor Detail
-
GridDhtDetachedCacheEntry
public GridDhtDetachedCacheEntry(GridCacheContext ctx, KeyCacheObject key)
- Parameters:
ctx- Cache context.key- Cache key.
-
-
Method Detail
-
resetFromPrimary
public void resetFromPrimary(CacheObject val, GridCacheVersion ver)
Sets value to detached entry so it can be retrieved in transactional gets.- Parameters:
val- Value.ver- Version.
-
unswap
@Nullable public @Nullable CacheDataRow unswap(CacheDataRow row, boolean checkExpire) throws IgniteCheckedException
Unswaps an entry.- Overrides:
unswapin classGridCacheMapEntry- Parameters:
row- Already extracted cache data.checkExpire- Iftruechecks for expiration, as result entry can be obsoleted or marked deleted.- Returns:
- Value.
- Throws:
IgniteCheckedException- If failed.
-
value
protected void value(@Nullable @Nullable CacheObject val)Sets entry value. If off-heap value storage is enabled, will serialize value to off-heap.- Overrides:
valuein classGridCacheMapEntry- Parameters:
val- Value to store.
-
storeValue
protected boolean storeValue(CacheObject val, long expireTime, GridCacheVersion ver) throws IgniteCheckedException
Stores value in offheap.- Overrides:
storeValuein classGridCacheMapEntry- Parameters:
val- Value.expireTime- Expire time.ver- New entry version.- Throws:
IgniteCheckedException- If update failed.
-
logUpdate
protected void logUpdate(GridCacheOperation op, CacheObject val, GridCacheVersion writeVer, long expireTime, long updCntr, boolean primary) throws IgniteCheckedException
- Overrides:
logUpdatein classGridCacheMapEntry- Parameters:
op- Update operation.val- Write value.writeVer- Write version.expireTime- Expire time.updCntr- Update counter.primary-Trueif node is primary for entry in the moment of logging.- Throws:
IgniteCheckedException
-
logTxUpdate
protected WALPointer logTxUpdate(IgniteInternalTx tx, CacheObject val, GridCacheVersion writeVer, long expireTime, long updCntr)
- Overrides:
logTxUpdatein classGridCacheMapEntry- Parameters:
tx- Transaction.val- Value.writeVer- New entry version.expireTime- Expire time (or 0 if not applicable).updCntr- Update counter.
-
removeValue
protected void removeValue() throws IgniteCheckedExceptionRemoves value from offheap.- Overrides:
removeValuein classGridCacheMapEntry- Throws:
IgniteCheckedException- If failed.
-
detached
public boolean detached()
- Specified by:
detachedin interfaceGridCacheEntryEx- Overrides:
detachedin classGridCacheMapEntry- Returns:
Falseif entry belongs to cache map,trueif this entry was created in colocated cache and node is not primary for this key.
-
toString
public String toString()
- Overrides:
toStringin classGridDistributedCacheEntry
-
addRemoved
public boolean addRemoved(GridCacheVersion ver)
- Overrides:
addRemovedin classGridDistributedCacheEntry- Parameters:
ver- Lock version.- Returns:
Trueif removed.
-
partition
public int partition()
- Specified by:
partitionin interfaceGridCacheEntryEx- Overrides:
partitionin classGridCacheMapEntry- Returns:
- Partition ID.
-
-