public class GridLocalAtomicCache<K,V> extends GridLocalCache<K,V>
GridCacheAdapter.AsyncOp<T>, GridCacheAdapter.BulkOperation, GridCacheAdapter.CacheExpiryPolicy, GridCacheAdapter.FutureHolder, GridCacheAdapter.InvokeAllTimeStatClosure<T>, 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 |
get(K key,
String taskName,
boolean deserializeBinary,
boolean needVer) |
Map<K,V> |
getAll(Collection<? extends K> keys,
boolean deserializeBinary,
boolean needVer,
boolean recovery,
boolean readRepair) |
IgniteInternalFuture<Map<K,V>> |
getAllAsync(@Nullable Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
@Nullable UUID subjId,
String taskName,
boolean deserializeBinary,
boolean recovery,
boolean readRepair,
boolean skipVals,
boolean needVer) |
protected V |
getAndPut0(K key,
V val,
@Nullable CacheEntryPredicate filter) |
IgniteInternalFuture<V> |
getAndPutAsync0(K key,
V val,
@Nullable 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(@Nullable 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,
@Nullable 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,
@Nullable 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(@Nullable Collection<? extends K> keys)
Unlocks given keys only if current thread owns the locks.
|
localPreloadPartition, localSizeLong, localSizeLong, lockAllAsync, preloadPartition, preloadPartitionAsync, startactive, active, affinity, allEntries, asyncOp, asyncOpAcquire, asyncOpRelease, awaitLastFut, cache, checkCurrentTx, 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, evict, evictAll, expiry, expiryPolicy, forceKeyCheck, forSubjectId, get, getAll, getAllAsync, getAllAsync, getAllAsync0, getAllOutTx, getAllOutTxAsync, getAndPut, getAndPut, getAndPutAsync, getAndPutAsync, getAndPutIfAbsent, getAndPutIfAbsentAsync, getAndRemove, getAndRemoveAsync, getAndReplace, getAndReplaceAsync, getAsync, getAsync, getEntries, getEntriesAsync, getEntry, getEntryAsync, getForcePrimary, getForcePrimaryAsync, igniteIterator, igniteIterator, incrementSize, init, invoke, isColocated, isDht, isDhtAtomic, isEmpty, isLocked, isLockedByThread, isNear, iterator, iterator, keepBinary, keySet, loadAll, localEntries, localLoad, localLoadCache, localLoadCacheAsync, localMetrics, localMxBean, localPeek, localSize, lock, lockAll, lockAsync, log, lostPartitions, map, metrics0, name, nearSize, offHeapAllocatedSize, offHeapEntriesCount, onKernalStart, onKernalStop, onReconnected, onUndeploy, parsePeekModes, peekEx, peekEx, 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, removeMetrics, repairableGet, repairableGetAll, repairableGetAllAsync, repairableGetAsync, repairAsync, repairAsync, replace, replace, replaceAsync, replaceAsync, saveFuture, scanIterator, setSkipStore, size, size, sizeAsync, sizeLong, sizeLong, sizeLong, sizeLongAsync, sizeLongAsync, skipStore, splitClearLocally, startInfo, stop, stopInfo, toString, tx, txStart, txStart, txStartEx, unlock, validateCacheKey, validateCacheKeys, warnIfUnordered, warnIfUnordered, withAllowAtomicOpsInTx, withExpiryPolicy, withNoRetries, writeExternalclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic 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 @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 @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 @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 @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 get(K key, String taskName, boolean deserializeBinary, boolean needVer) throws IgniteCheckedException
get 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> getAll(Collection<? extends K> keys, boolean deserializeBinary, boolean needVer, boolean recovery, boolean readRepair) throws IgniteCheckedException
getAll in class GridCacheAdapter<K,V>keys - Keys.deserializeBinary - Deserialize binary flag.needVer - Need version.recovery - Recovery flag.readRepair - Read repair flag.IgniteCheckedException - If read failed.public IgniteInternalFuture<Map<K,V>> getAllAsync(@Nullable @Nullable Collection<? extends K> keys, boolean forcePrimary, boolean skipTx, @Nullable @Nullable UUID subjId, String taskName, boolean deserializeBinary, boolean recovery, boolean readRepair, boolean skipVals, 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.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.EntryProcessorExceptionpublic <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 @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
@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 Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020