public class GridNearCacheEntry<K,V> extends GridDistributedCacheEntry<K,V>
| Constructor and Description |
|---|
GridNearCacheEntry(GridCacheContext<K,V> ctx,
K key,
int hash,
V val,
GridCacheMapEntry<K,V> next,
long ttl,
int hdrId) |
| Modifier and Type | Method and Description |
|---|---|
GridCacheMvccCandidate<K> |
addLocal(long threadId,
GridCacheVersion ver,
long timeout,
boolean reenter,
boolean tx,
boolean implicitSingle)
Add local candidate.
|
GridCacheMvccCandidate<K> |
addNearLocal(UUID dhtNodeId,
long threadId,
GridCacheVersion ver,
long timeout,
boolean reenter,
boolean tx,
boolean implicitSingle)
Add near local candidate.
|
protected void |
clearIndex(V val)
Clears index.
|
GridCacheMvccCandidate<K> |
dhtNodeId(GridCacheVersion ver,
UUID dhtNodeId) |
GridCacheVersion |
dhtVersion() |
boolean |
initializeFromDht(long topVer) |
boolean |
isNear() |
boolean |
loadedValue(IgniteInternalTx tx,
UUID primaryNodeId,
V val,
byte[] valBytes,
GridCacheVersion ver,
GridCacheVersion dhtVer,
GridCacheVersion expVer,
long ttl,
long expireTime,
boolean evt,
long topVer,
UUID subjId) |
int |
memorySize() |
protected void |
onInvalidate()
Called when entry invalidated.
|
int |
partition() |
protected V |
readThrough(IgniteInternalTx<K,V> tx,
K key,
boolean reload,
UUID subjId,
String taskName) |
void |
recordDhtVersion(GridCacheVersion dhtVer)
This method should be called only when committing optimistic transactions.
|
protected void |
recordNodeId(UUID primaryNodeId) |
GridCacheMvccCandidate<K> |
removeLock()
Unlocks local lock.
|
boolean |
resetFromPrimary(V val,
byte[] valBytes,
GridCacheVersion ver,
GridCacheVersion dhtVer,
UUID primaryNodeId)
This method should be called only when lock is owned on this entry.
|
String |
toString() |
protected void |
updateIndex(V val,
byte[] valBytes,
long expireTime,
GridCacheVersion ver,
V old)
Updates cache index.
|
void |
updateOrEvict(GridCacheVersion dhtVer,
V val,
byte[] valBytes,
long expireTime,
long ttl,
UUID primaryNodeId)
This method should be called only when lock is owned on this entry.
|
boolean |
valid(long topVer) |
GridTuple3<GridCacheVersion,V,byte[]> |
versionedValue() |
addRemote, addRemote, addRemoved, checkCallbacks, checkOwnerChanged, checkRemoved, checkThreadChain, doneRemote, doneRemote, orderCompleted, readyLock, readyNearLock, recheck, refreshRemotes, remoteMvccSnapshot, removeExplicitNodeLocks, removeLock, tmLock, txUnlockaddMeta, candidate, candidate, checkObsolete, clear, clearReader, clearReaders, compact, context, deleted, deletedUnlocked, deletedUnlocked, detached, equals, evictInBatchInternal, evictInternal, expireTime, expireTimeExtras, expireTimeUnlocked, getOrMarshalKeyBytes, hashCode, hasLockCandidate, hasLockCandidate, hasLockCandidateUnsafe, hasMeta, hasReaders, hasValue, hasValueUnlocked, info, initialValue, initialValue, innerGet, innerReload, innerRemove, innerSet, innerUpdate, innerUpdateLocal, invalidate, invalidate, isDht, isInternal, isLocal, 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, onMarkedObsolete, onTtlExpired, partitionValid, peek, peek, peek, peek0, peekFailFast, poke, putMetaIfAbsent, putMetaIfAbsent, rawExpireTime, rawGet, rawGetOrUnmarshal, rawGetOrUnmarshalUnlocked, rawPut, rawTtl, readExternalMeta, releaseSwap, removeMeta, removeMeta, replaceMeta, saveValueForIndexUnlocked, startVersion, toExpireTime, ttl, ttlAndExpireTimeExtras, ttlExtras, txKey, unswap, unswap, update, updateTtl, value, valueBytes, valueBytes, valueBytesUnlocked, version, versionedEntry, versionedValue, visitable, wrap, wrapEviction, wrapFilterLocked, wrapLazyValue, wrapVersioned, writeExternalMetapublic GridNearCacheEntry(GridCacheContext<K,V> ctx, K key, int hash, V val, GridCacheMapEntry<K,V> next, long ttl, int hdrId)
ctx - Cache context.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 isNear()
isNear in interface GridCacheEntryEx<K,V>isNear in class GridCacheMapEntry<K,V>True if near.public boolean valid(long topVer)
valid in interface GridCacheEntryEx<K,V>valid in class GridCacheMapEntry<K,V>topVer - Topology version where validation should be performed.
When negative the latest available topology should be used.public boolean initializeFromDht(long topVer)
throws GridCacheEntryRemovedException
topVer - Topology version.True if this entry was initialized by this call.GridCacheEntryRemovedException - If this entry is obsolete.public boolean resetFromPrimary(V val, byte[] valBytes, GridCacheVersion ver, GridCacheVersion dhtVer, UUID primaryNodeId) throws GridCacheEntryRemovedException, IgniteCheckedException
val - Value.valBytes - Value bytes.ver - Version.dhtVer - DHT version.primaryNodeId - Primary node ID.True if reset was done.GridCacheEntryRemovedException - If obsolete.IgniteCheckedException - If failed.public void updateOrEvict(GridCacheVersion dhtVer, @Nullable V val, @Nullable byte[] valBytes, long expireTime, long ttl, UUID primaryNodeId)
dhtVer - DHT version.val - Value associated with version.valBytes - Value bytes.expireTime - Expire time.ttl - Time to live.primaryNodeId - Primary node ID.@Nullable public GridCacheVersion dhtVersion() throws GridCacheEntryRemovedException
GridCacheEntryRemovedException - If obsolete.@Nullable public GridTuple3<GridCacheVersion,V,byte[]> versionedValue() throws GridCacheEntryRemovedException
GridCacheEntryRemovedException - If entry has been removed.protected void recordNodeId(UUID primaryNodeId)
recordNodeId in class GridCacheMapEntry<K,V>primaryNodeId - Node ID.public void recordDhtVersion(GridCacheVersion dhtVer)
dhtVer - DHT version to record.protected V readThrough(IgniteInternalTx<K,V> tx, K key, boolean reload, UUID subjId, String taskName) throws IgniteCheckedException
readThrough in class GridCacheMapEntry<K,V>tx - Transaction.key - Key.reload - flag.subjId - Subject ID.taskName - Task name.IgniteCheckedException - If failed.public boolean loadedValue(@Nullable IgniteInternalTx tx, UUID primaryNodeId, V val, byte[] valBytes, GridCacheVersion ver, GridCacheVersion dhtVer, @Nullable GridCacheVersion expVer, long ttl, long expireTime, boolean evt, long topVer, UUID subjId) throws IgniteCheckedException, GridCacheEntryRemovedException
tx - Transaction.primaryNodeId - Primary node ID.val - New value.valBytes - Value bytes.ver - Version to use.dhtVer - DHT version received from remote node.expVer - Optional version to match.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(V val, byte[] valBytes, long expireTime, GridCacheVersion ver, V old) throws IgniteCheckedException
updateIndex in class GridCacheMapEntry<K,V>val - Value.valBytes - Value bytes.expireTime - Expire time.ver - New entry version.old - Previous value.IgniteCheckedException - If update failed.protected void clearIndex(V val)
clearIndex in class GridCacheMapEntry<K,V>val - Previous value (if needed for index update).public GridCacheMvccCandidate<K> addLocal(long threadId, GridCacheVersion ver, long timeout, boolean reenter, boolean tx, boolean implicitSingle) throws GridCacheEntryRemovedException
addLocal in class GridDistributedCacheEntry<K,V>threadId - Owning thread ID.ver - Lock version.timeout - Timeout to acquire lock.reenter - Reentry flag.tx - Transaction flag.implicitSingle - Implicit flag.GridCacheEntryRemovedException - If entry has been removed.@Nullable public GridCacheMvccCandidate<K> addNearLocal(@Nullable UUID dhtNodeId, long threadId, GridCacheVersion ver, long timeout, boolean reenter, boolean tx, boolean implicitSingle) throws GridCacheEntryRemovedException
dhtNodeId - DHT node ID.threadId - Owning thread ID.ver - Lock version.timeout - Timeout to acquire lock.reenter - Reentry flag.tx - Transaction flag.implicitSingle - Implicit flag.GridCacheEntryRemovedException - If entry has been removed.@Nullable public GridCacheMvccCandidate<K> 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<K> removeLock()
removeLock in class GridDistributedCacheEntry<K,V>protected void onInvalidate()
onInvalidate in class GridCacheMapEntry<K,V>public String toString()
toString in class GridDistributedCacheEntry<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 17 2015