org.apache.ignite.internal.processors.cache.local

## Class GridLocalCacheEntry

- java.lang.Object
- - org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter
  - - org.apache.ignite.internal.processors.cache.GridCacheMapEntry
    - - org.apache.ignite.internal.processors.cache.local.GridLocalCacheEntry

All Implemented Interfaces:
  GridCacheEntryEx

    public class GridLocalCacheEntry
    extends GridCacheMapEntry

Cache entry for local caches.

### 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, flags, key, log, logRef, startVer, val, ver`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `checkThreadChain(GridCacheMvccCandidate owner)`
`boolean` `isLocal()`
`void` `recheck()` Rechecks if lock should be reassigned.
`boolean` `removeLock(GridCacheVersion ver)`
`boolean` `tmLock(IgniteInternalTx tx, long timeout, GridCacheVersion serOrder, GridCacheVersion serReadVer, boolean read)` This locks is called by transaction manager during prepare step for optimistic transactions.
`String` `toString()`
`void` `txUnlock(IgniteInternalTx tx)` Unlocks lock if it is currently owned.

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMapEntry

`candidate, candidate, checkObsolete, checkOwnerChanged, checkSerializableReadVersion, clear, clearReader, clearReaders, clearReserveForLoad, context, decrementMapPublicSize, deleted, deletedUnlocked, deletedUnlocked, detached, equals, evictInternal, evictionDisabled, expireTime, expireTimeExtras, expireTimeUnlocked, hashCode, hasLockCandidate, hasLockCandidate, hasLockCandidateUnsafe, hasReaders, hasValue, hasValueUnlocked, incrementMapPublicSize, info, initialValue, innerGet, innerGetAndReserveForLoad, innerGetVersioned, innerReload, innerRemove, innerSet, innerUpdate, innerUpdateLocal, invalidate, isDht, isInternal, isNear, isNew, isNewLocked, isReplicated, isStartVersion, key, keyValue, localCandidate, localCandidates, localOwner, localPartition, lockedBy, lockedByAny, lockedByCurrentThread, lockedByThread, lockedByThread, lockedByThread, lockedByThreadUnsafe, lockedByUnsafe, lockedLocally, lockedLocallyByIdOrThread, lockedLocallyUnsafe, lockEntry, logTxUpdate, logUpdate, markObsolete, markObsolete0, markObsoleteIfEmpty, markObsoleteVersion, memorySize, mvccAllLocal, mvccExtras, mvccExtras, nextPartitionCounter, obsolete, obsolete, obsoleteOrDeleted, obsoleteVersion, obsoleteVersionExtras, onInvalidate, onMarkedObsolete, onTtlExpired, onUnlock, onUpdateFinished, partition, partitionValid, peek, peek, peekVisibleValue, rawExpireTime, rawGet, rawPut, rawTtl, readThrough, recordNodeId, remoteMvccSnapshot, removeValue, startVersion, storeValue, storeValue, ttl, ttlAndExpireTimeExtras, ttlExtras, txKey, unlockEntry, unswap, unswap, unswap, unswap, update, updateIndex, updateTtl, valid, value, 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, readExternalMeta, removeAllMeta, removeMeta, removeMeta, replaceMeta, writeExternalMeta`

### 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, meta, putMetaIfAbsent, removeMeta, removeMeta, replaceMeta`

### Method Detail

#### isLocal

    public boolean isLocal()

Specified by:
  `isLocal` in interface `GridCacheEntryEx`
Overrides:
  `isLocal` in class `GridCacheMapEntry`
Returns:
  `True` if local.

#### tmLock

    public boolean tmLock(IgniteInternalTx tx,
                          long timeout,
                          @Nullable
                          GridCacheVersion serOrder,
                          GridCacheVersion serReadVer,
                          boolean read)
                   throws GridCacheEntryRemovedException

This locks is called by transaction manager during prepare step for optimistic transactions.

Parameters:
  `tx` - Cache transaction.
  `timeout` - Timeout for lock acquisition.
  `serOrder` - Version for serializable transactions ordering.
  `serReadVer` - Optional read entry version for optimistic serializable transaction.
  `read` - Read lock flag.
Returns:
  `True` if lock was acquired, `false` otherwise.
Throws:
  `GridCacheEntryRemovedException` - If this entry is obsolete.

#### recheck

    public void recheck()

Rechecks if lock should be reassigned.

#### checkThreadChain

    protected void checkThreadChain(GridCacheMvccCandidate owner)

Specified by:
  `checkThreadChain` in class `GridCacheMapEntry`
Parameters:
  `owner` - Starting candidate in the chain.

#### txUnlock

    public void txUnlock(IgniteInternalTx tx)
                  throws GridCacheEntryRemovedException

Unlocks lock if it is currently owned.

Parameters:
  `tx` - Transaction to unlock.
Throws:
  `GridCacheEntryRemovedException` - If this entry has been removed from cache.

#### removeLock

    public boolean removeLock(GridCacheVersion ver)
                       throws GridCacheEntryRemovedException

Parameters:
  `ver` - Removes lock.
Returns:
  `True` If lock has been removed.
Throws:
  `GridCacheEntryRemovedException` - If this entry has been removed from cache.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCacheMapEntry`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018