public class GridLocalAtomicCache<K,V> extends GridLocalCache<K,V>
GridCacheAdapter.AsyncOp<T>, GridCacheAdapter.CacheExpiryPolicy, GridCacheAdapter.FutureHolder, GridCacheAdapter.PeekModes, GridCacheAdapter.TopologyVersionAwareJob, GridCacheAdapter.UpdateGetTimeStatClosure<T>, GridCacheAdapter.UpdatePutAndGetTimeStatClosure<T>, GridCacheAdapter.UpdatePutTimeStatClosure<T>, GridCacheAdapter.UpdateRemoveTimeStatClosure<T>, GridCacheAdapter.UpdateTimeStatClosure<T>
cacheCfg, CLEAR_ALL_SPLIT_THRESHOLD, ctx, DFLT_START_CACHE_SIZE, keyCheck, lastFut, locNodeId, log, map, MAX_RETRIES, metrics, RET2NULL, txLockMsgLog
Constructor and Description |
---|
GridLocalAtomicCache()
Empty constructor required by
Externalizable . |
GridLocalAtomicCache(GridCacheContext<K,V> ctx) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkJta()
Checks if cache is working in JTA transaction and enlist cache as XAResource if necessary.
|
protected V |
get0(K key,
String taskName,
boolean deserializeBinary,
boolean needVer) |
Map<K,V> |
getAll0(Collection<? extends K> keys,
boolean deserializeBinary,
boolean needVer) |
IgniteInternalFuture<Map<K,V>> |
getAllAsync(Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
UUID subjId,
String taskName,
boolean deserializeBinary,
boolean recovery,
boolean skipVals,
boolean canRemap,
boolean needVer) |
protected V |
getAndPut0(K key,
V val,
CacheEntryPredicate filter) |
IgniteInternalFuture<V> |
getAndPutAsync0(K key,
V val,
CacheEntryPredicate filter) |
protected V |
getAndRemove0(K key) |
IgniteInternalFuture<V> |
getAndRemoveAsync0(K key) |
<T> javax.cache.processor.EntryProcessorResult<T> |
invoke(K key,
javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
Object... args) |
<T> Map<K,javax.cache.processor.EntryProcessorResult<T>> |
invokeAll(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map,
Object... args) |
<T> Map<K,javax.cache.processor.EntryProcessorResult<T>> |
invokeAll(Set<? extends K> keys,
javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
Object... args) |
<T> IgniteInternalFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> |
invokeAllAsync(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map,
Object... args) |
<T> IgniteInternalFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> |
invokeAllAsync(Set<? extends K> keys,
javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
Object... args) |
<T> IgniteInternalFuture<javax.cache.processor.EntryProcessorResult<T>> |
invokeAsync(K key,
javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
Object... args) |
boolean |
isLocal() |
IgniteInternalFuture<Boolean> |
lockAllAsync(Collection<? extends K> keys,
long timeout)
All or nothing synchronous lock for passed in keys.
|
void |
onDeferredDelete(GridCacheEntryEx entry,
GridCacheVersion ver) |
GridCachePreloader |
preloader() |
protected boolean |
put0(K key,
V val,
CacheEntryPredicate filter) |
protected void |
putAll0(Map<? extends K,? extends V> m) |
IgniteInternalFuture<?> |
putAllAsync0(Map<? extends K,? extends V> m) |
IgniteInternalFuture<Boolean> |
putAsync0(K key,
V val,
CacheEntryPredicate filter) |
boolean |
remove0(K key,
CacheEntryPredicate filter) |
void |
removeAll0(Collection<? extends K> keys) |
IgniteInternalFuture<?> |
removeAllAsync() |
IgniteInternalFuture<Object> |
removeAllAsync0(Collection<? extends K> keys) |
IgniteInternalFuture<Boolean> |
removeAsync0(K key,
CacheEntryPredicate filter) |
IgniteInternalFuture<Boolean> |
txLockAsync(Collection<KeyCacheObject> keys,
long timeout,
IgniteTxLocalEx tx,
boolean isRead,
boolean retval,
TransactionIsolation isolation,
boolean invalidate,
long createTtl,
long accessTtl) |
void |
unlockAll(Collection<? extends K> keys)
Unlocks given keys only if current thread owns the locks.
|
entryFactory, localSizeLong, localSizeLong, lockAllAsync
affinity, allEntries, asyncOp, asyncOpAcquire, asyncOpRelease, awaitLastFut, cache, clear, clear, clearAll, clearAllAsync, clearAsync, clearAsync, clearLocally, clearLocally, clearLocally, clearLocallyAll, clusterMetrics, clusterMetrics, clusterMxBean, configuration, containsKey, containsKeyAsync, containsKeys, containsKeysAsync, context, decrementSize, entries, entryEx, entryEx, entryEx, entrySet, entrySet, entrySet, entrySetx, evict, evictAll, expiry, expiryPolicy, forceKeyCheck, forSubjectId, get, get, getAll, getAllAsync, getAllAsync, getAllAsync, getAllAsync0, getAllOutTx, getAllOutTxAsync, getAndPut, getAndPut, getAndPutAsync, getAndPutAsync, getAndPutIfAbsent, getAndPutIfAbsentAsync, getAndRemove, getAndRemoveAsync, getAndReplace, getAndReplaceAsync, getAsync, getAsync, getAsync, getEntries, getEntriesAsync, getEntry, getEntryAsync, getForcePrimary, getForcePrimaryAsync, getTopologySafe, igfsDataSpaceUsed, igniteIterator, igniteIterator, incrementSize, init, invoke, isColocated, isDht, isDhtAtomic, isEmpty, isIgfsDataCache, isLocked, isLockedByThread, isMongoDataCache, isMongoMetaCache, isNear, iterator, iterator, keepBinary, keySet, keySetx, loadAll, localEntries, localLoad, localLoadCache, localLoadCacheAsync, localMetrics, localMxBean, localPeek, localSize, lock, lockAll, lockAsync, log, lostPartitions, map, metrics0, name, nearSize, offHeapAllocatedSize, offHeapEntriesCount, onIgfsDataSizeChanged, onKernalStart, onKernalStop, onReconnected, onUndeploy, parsePeekModes, peekEx, peekEx, primaryKeySet, primarySize, primarySizeLong, printMemoryStats, put, put, putAll, putAllAsync, putAllConflict, putAllConflictAsync, putAsync, putAsync, putIfAbsent, putIfAbsentAsync, readExternal, readResolve, rebalance, remove, remove, remove, removeAll, removeAll, removeAllAsync, removeAllConflict, removeAllConflictAsync, removeAsync, removeAsync, removeAsync, removeEntry, removeIfObsolete, replace, replace, replaceAsync, replaceAsync, saveFuture, scanIterator, setSkipStore, size, size, sizeAsync, sizeLong, sizeLong, sizeLong, sizeLongAsync, sizeLongAsync, skipStore, splitClearLocally, start, startInfo, stop, stopInfo, toString, tx, txStart, txStart, txStartEx, unlock, validateCacheKey, validateCacheKeys, values, values, withExpiryPolicy, withNoRetries, writeExternal
public GridLocalAtomicCache()
Externalizable
.public GridLocalAtomicCache(GridCacheContext<K,V> ctx)
ctx
- Cache context.protected void checkJta() throws IgniteCheckedException
checkJta
in class GridCacheAdapter<K,V>
IgniteCheckedException
- In case of error.public boolean isLocal()
isLocal
in class GridLocalCache<K,V>
True
if cache is local.public GridCachePreloader preloader()
preloader
in class GridLocalCache<K,V>
protected V getAndPut0(K key, V val, @Nullable CacheEntryPredicate filter) throws IgniteCheckedException
getAndPut0
in class GridCacheAdapter<K,V>
key
- Key.val
- Value.filter
- Optional filter.IgniteCheckedException
- If failed.protected boolean put0(K key, V val, CacheEntryPredicate filter) throws IgniteCheckedException
put0
in class GridCacheAdapter<K,V>
key
- Key.val
- Value.filter
- Filter.True
if optional filter passed and value was stored in cache,
false
otherwise. Note that this method will return true
if filter is not
specified.IgniteCheckedException
- If put operation failed.public IgniteInternalFuture<V> getAndPutAsync0(K key, V val, @Nullable CacheEntryPredicate filter)
getAndPutAsync0
in class GridCacheAdapter<K,V>
key
- Key.val
- Value.filter
- Optional filter.public IgniteInternalFuture<Boolean> putAsync0(K key, V val, @Nullable CacheEntryPredicate filter)
putAsync0
in class GridCacheAdapter<K,V>
key
- Key.val
- Value.filter
- Optional filter.protected void putAll0(Map<? extends K,? extends V> m) throws IgniteCheckedException
putAll0
in class GridCacheAdapter<K,V>
m
- Map.IgniteCheckedException
- If failed.public IgniteInternalFuture<?> putAllAsync0(Map<? extends K,? extends V> m)
putAllAsync0
in class GridCacheAdapter<K,V>
m
- Map.protected V getAndRemove0(K key) throws IgniteCheckedException
getAndRemove0
in class GridCacheAdapter<K,V>
key
- Key.IgniteCheckedException
- If failed.public IgniteInternalFuture<V> getAndRemoveAsync0(K key)
getAndRemoveAsync0
in class GridCacheAdapter<K,V>
key
- Key.public void removeAll0(Collection<? extends K> keys) throws IgniteCheckedException
removeAll0
in class GridCacheAdapter<K,V>
keys
- Keys.IgniteCheckedException
- If failed.public IgniteInternalFuture<Object> removeAllAsync0(Collection<? extends K> keys)
removeAllAsync0
in class GridCacheAdapter<K,V>
keys
- Keys.public boolean remove0(K key, CacheEntryPredicate filter) throws IgniteCheckedException
remove0
in class GridCacheAdapter<K,V>
key
- Key.filter
- Filter.True
if entry was removed.IgniteCheckedException
- If failed.public IgniteInternalFuture<Boolean> removeAsync0(K key, @Nullable CacheEntryPredicate filter)
removeAsync0
in class GridCacheAdapter<K,V>
key
- Key.filter
- Filter.public IgniteInternalFuture<?> removeAllAsync()
removeAllAsync
in interface IgniteInternalCache<K,V>
removeAllAsync
in class GridLocalCache<K,V>
protected V get0(K key, String taskName, boolean deserializeBinary, boolean needVer) throws IgniteCheckedException
get0
in class GridCacheAdapter<K,V>
key
- Key.taskName
- Task name.deserializeBinary
- Deserialize binary flag.needVer
- Need version.IgniteCheckedException
- If failed.public final Map<K,V> getAll0(Collection<? extends K> keys, boolean deserializeBinary, boolean needVer) throws IgniteCheckedException
getAll0
in class GridCacheAdapter<K,V>
keys
- Keys.deserializeBinary
- Deserialize binary flag.needVer
- Need version.IgniteCheckedException
- If read failed.public IgniteInternalFuture<Map<K,V>> getAllAsync(@Nullable Collection<? extends K> keys, boolean forcePrimary, boolean skipTx, @Nullable UUID subjId, String taskName, boolean deserializeBinary, boolean recovery, boolean skipVals, boolean canRemap, boolean needVer)
getAllAsync
in class GridCacheAdapter<K,V>
keys
- Keys.forcePrimary
- Force primary.skipTx
- Skip tx.subjId
- Subj Id.taskName
- Task name.deserializeBinary
- Deserialize binary.recovery
- Recovery mode flag.skipVals
- Skip values.canRemap
- Can remap flag.needVer
- Need version.GridCacheAdapter.getAllAsync(Collection)
public <T> javax.cache.processor.EntryProcessorResult<T> invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args) throws IgniteCheckedException
invoke
in interface IgniteInternalCache<K,V>
invoke
in class GridCacheAdapter<K,V>
key
- Key.entryProcessor
- Entry processor.args
- Arguments.IgniteCheckedException
- If failed.public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args) throws IgniteCheckedException
invokeAll
in interface IgniteInternalCache<K,V>
invokeAll
in class GridCacheAdapter<K,V>
keys
- Keys.entryProcessor
- Entry processor.args
- Arguments.IgniteCheckedException
- If failed.public <T> IgniteInternalFuture<javax.cache.processor.EntryProcessorResult<T>> invokeAsync(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args) throws javax.cache.processor.EntryProcessorException
invokeAsync
in interface IgniteInternalCache<K,V>
invokeAsync
in class GridCacheAdapter<K,V>
key
- Key.entryProcessor
- Entry processor.args
- Arguments.javax.cache.processor.EntryProcessorException
public <T> IgniteInternalFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> invokeAllAsync(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args)
invokeAllAsync
in interface IgniteInternalCache<K,V>
invokeAllAsync
in class GridCacheAdapter<K,V>
keys
- Keys.entryProcessor
- Entry processor.args
- Arguments.public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map, Object... args) throws IgniteCheckedException
invokeAll
in interface IgniteInternalCache<K,V>
invokeAll
in class GridCacheAdapter<K,V>
map
- Map containing keys and entry processors to be applied to values.args
- Arguments.IgniteCheckedException
- If failed.public <T> IgniteInternalFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> invokeAllAsync(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map, Object... args)
invokeAllAsync
in interface IgniteInternalCache<K,V>
invokeAllAsync
in class GridCacheAdapter<K,V>
map
- Map containing keys and entry processors to be applied to values.args
- Arguments.public IgniteInternalFuture<Boolean> txLockAsync(Collection<KeyCacheObject> keys, long timeout, IgniteTxLocalEx tx, boolean isRead, boolean retval, TransactionIsolation isolation, boolean invalidate, long createTtl, long accessTtl)
txLockAsync
in class GridLocalCache<K,V>
keys
- Keys to lock.timeout
- Lock timeout.tx
- Transaction.isRead
- True
for read operations.retval
- Flag to return value.isolation
- Transaction isolation.invalidate
- Invalidate flag.createTtl
- TTL for create operation.accessTtl
- TTL for read operation.public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout)
TransactionConcurrency.PESSIMISTIC
concurrency control for transaction
which will acquire explicit locks for relevant cache operations.lockAllAsync
in interface IgniteInternalCache<K,V>
lockAllAsync
in class GridLocalCache<K,V>
keys
- Keys to lock.timeout
- Timeout in milliseconds to wait for lock to be acquired
('0'
for no expiration).true
if all filters passed and locks were acquired before
timeout has expired, false
otherwise.public void unlockAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException
TransactionConcurrency.PESSIMISTIC
concurrency control for transaction
which will acquire explicit locks for relevant cache operations.unlockAll
in interface IgniteInternalCache<K,V>
unlockAll
in class GridLocalCache<K,V>
keys
- Keys to unlock.IgniteCheckedException
- If unlock execution resulted in error.public void onDeferredDelete(GridCacheEntryEx entry, GridCacheVersion ver)
onDeferredDelete
in class GridLocalCache<K,V>
entry
- Entry.ver
- Version.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017