public class GridLocalAtomicCache<K,V> extends GridCacheAdapter<K,V>
GridCacheAdapter.AsyncOp<T>, GridCacheAdapter.CacheExpiryPolicy, GridCacheAdapter.FutureHolder, GridCacheAdapter.UpdateGetTimeStatClosure<T>, GridCacheAdapter.UpdatePutAndGetTimeStatClosure<T>, GridCacheAdapter.UpdatePutTimeStatClosure<T>, GridCacheAdapter.UpdateRemoveTimeStatClosure<T>, GridCacheAdapter.UpdateTimeStatClosure<T>| Constructor and Description |
|---|
GridLocalAtomicCache()
Empty constructor required by
Externalizable. |
GridLocalAtomicCache(GridCacheContext<K,V> ctx) |
| Modifier and Type | Method and Description |
|---|---|
protected IgniteInternalFuture |
asyncOp(Callable<?> op) |
V |
get(K key,
boolean deserializePortable) |
Map<K,V> |
getAll(Collection<? extends K> keys,
boolean deserializePortable) |
IgniteInternalFuture<Map<K,V>> |
getAllAsync(Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
GridCacheEntryEx entry,
UUID subjId,
String taskName,
boolean deserializePortable,
boolean skipVals) |
protected void |
init()
Post constructor initialization for subclasses.
|
<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,
CacheEntryPredicate... filter)
All or nothing synchronous lock for passed in keys.
|
void |
onDeferredDelete(GridCacheEntryEx entry,
GridCacheVersion ver) |
GridCachePreloader<K,V> |
preloader() |
V |
put(K key,
V val,
GridCacheEntryEx cached,
long ttl,
CacheEntryPredicate[] filter)
Internal method that is called from
CacheEntryImpl. |
void |
putAll(Map<? extends K,? extends V> m,
CacheEntryPredicate[] filter)
Stores given key-value pairs in cache.
|
IgniteInternalFuture<?> |
putAllAsync(Map<? extends K,? extends V> m,
CacheEntryPredicate[] filter)
Asynchronously stores given key-value pairs in cache.
|
IgniteInternalFuture<V> |
putAsync(K key,
V val,
GridCacheEntryEx entry,
long ttl,
CacheEntryPredicate... filter)
Internal method that is called from
CacheEntryImpl. |
V |
putIfAbsent(K key,
V val)
Stores given key-value pair in cache only if cache had no previous mapping for it.
|
IgniteInternalFuture<V> |
putIfAbsentAsync(K key,
V val)
Asynchronously stores given key-value pair in cache only if cache had no previous mapping for it.
|
boolean |
putx(K key,
V val,
CacheEntryPredicate[] filter)
Stores given key-value pair in cache.
|
boolean |
putx(K key,
V val,
GridCacheEntryEx cached,
long ttl,
CacheEntryPredicate... filter)
Internal method that is called from
CacheEntryImpl. |
IgniteInternalFuture<Boolean> |
putxAsync(K key,
V val,
GridCacheEntryEx entry,
long ttl,
CacheEntryPredicate... filter)
Internal method that is called from
CacheEntryImpl. |
boolean |
putxIfAbsent(K key,
V val)
Stores given key-value pair in cache only if cache had no previous mapping for it.
|
IgniteInternalFuture<Boolean> |
putxIfAbsentAsync(K key,
V val)
Asynchronously stores given key-value pair in cache only if cache had no previous mapping for it.
|
V |
remove(K key,
GridCacheEntryEx entry,
CacheEntryPredicate... filter)
Internal method that is called from
CacheEntryImpl. |
boolean |
remove(K key,
V val)
Removes given key mapping from cache if one exists and value is equal to the passed in value.
|
void |
removeAll()
Removes mappings from cache for entries for which the optionally passed in filters do
pass.
|
void |
removeAll(Collection<? extends K> keys,
CacheEntryPredicate... filter)
Removes given key mappings from cache for entries for which the optionally passed in filters do
pass.
|
IgniteInternalFuture<?> |
removeAllAsync() |
IgniteInternalFuture<?> |
removeAllAsync(Collection<? extends K> keys,
CacheEntryPredicate[] filter)
Asynchronously removes given key mappings from cache for entries for which the optionally
passed in filters do pass.
|
IgniteInternalFuture<V> |
removeAsync(K key,
GridCacheEntryEx entry,
CacheEntryPredicate... filter)
Internal method that is called from
CacheEntryImpl. |
IgniteInternalFuture<Boolean> |
removeAsync(K key,
V val)
Asynchronously removes given key mapping from cache if one exists and value is equal to the passed in value.
|
boolean |
removex(K key,
GridCacheEntryEx entry,
CacheEntryPredicate... filter)
Internal method that is called from
CacheEntryImpl. |
GridCacheReturn |
removex(K key,
V val)
Removes given key mapping from cache if one exists and value is equal to the passed in value.
|
IgniteInternalFuture<Boolean> |
removexAsync(K key,
GridCacheEntryEx entry,
CacheEntryPredicate... filter)
Internal method that is called from
CacheEntryImpl. |
IgniteInternalFuture<GridCacheReturn> |
removexAsync(K key,
V val)
Asynchronously removes given key mapping from cache if one exists and value is equal to the passed in value.
|
V |
replace(K key,
V val)
Stores given key-value pair in cache only if there is a previous mapping for it.
|
boolean |
replace(K key,
V oldVal,
V newVal)
Stores given key-value pair in cache only if only if the previous value is equal to the
'oldVal' passed in. |
IgniteInternalFuture<V> |
replaceAsync(K key,
V val)
Asynchronously stores given key-value pair in cache only if there is a previous mapping for it.
|
IgniteInternalFuture<Boolean> |
replaceAsync(K key,
V oldVal,
V newVal)
Asynchronously stores given key-value pair in cache only if only if the previous value is equal to the
'oldVal' passed in. |
boolean |
replacex(K key,
V val)
Stores given key-value pair in cache only if only if there is a previous mapping for it.
|
GridCacheReturn |
replacex(K key,
V oldVal,
V newVal)
Stores given key-value pair in cache only if only if the previous value is equal to the
'oldVal' passed in. |
IgniteInternalFuture<Boolean> |
replacexAsync(K key,
V val)
Asynchronously stores given key-value pair in cache only if only if there is a previous mapping for it.
|
IgniteInternalFuture<GridCacheReturn> |
replacexAsync(K key,
V oldVal,
V newVal)
Asynchronously stores given key-value pair in cache only if only if the previous value is equal to the
'oldVal' passed in. |
IgniteInternalFuture<Boolean> |
txLockAsync(Collection<KeyCacheObject> keys,
long timeout,
IgniteTxLocalEx tx,
boolean isRead,
boolean retval,
TransactionIsolation isolation,
boolean invalidate,
long accessTtl,
CacheEntryPredicate[] filter) |
void |
unlockAll(Collection<? extends K> keys,
CacheEntryPredicate... filter)
Unlocks given keys only if current thread owns the locks.
|
affinity, affinityNode, allEntries, asyncOp, asyncOpAcquire, asyncOpRelease, awaitLastFut, cache, checkJta, clear, clear, clear, clearAll, clearAsync, clearAsync, clearAsync, clearLocally, clearLocally, clearLocally, clearLocally0, clearLocally0, clearLocallyAll, commitTxAsync, configuration, containsKey, containsKeyAsync, containsKeys, containsKeysAsync, containsValue, context, entries, entry, entryEx, entryEx, entryEx, entryEx, entryExSafe, entrySet, entrySet, entrySet, entrySetx, evict, evict, evictAll, evictAll, evictAll, expiry, expiryPolicy, flags, flagsOff, flagsOn, forceRepartition, forSubjectId, get, get, getAll, getAllAsync, getAllAsync, getAllAsync, getAllAsync0, getAllOutTx, getAllOutTxAsync, getAsync, getAsync, getForcePrimary, getForcePrimaryAsync, globalPrimarySize, globalSize, gridProjection, igfsDataSpaceMax, igfsDataSpaceUsed, igniteIterator, isColocated, isDht, isDhtAtomic, isEmpty, isIgfsDataCache, isLocked, isLockedByThread, isMongoDataCache, isMongoMetaCache, isNear, iterator, iterator, keepPortable, keepPortable0, keySet, keySet, loadAll, localEntries, localLoad, localLoadCache, localLoadCacheAsync, localPeek, localRemoveAll, localRemoveAll, localSize, lock, lockAll, lockAsync, log, map, metrics, metrics0, mxBean, name, nearSize, offHeapAllocatedSize, offHeapEntriesCount, offHeapIterator, onIgfsDataSizeChanged, onKernalStart, onKernalStop, onUndeploy, overflowSize, peek, peek, peek, peek0, peek0, peek0, peekAll0, peekEx, peekEx, predicate, primaryEntrySet, primaryEntrySet, primaryEntrySetx, primaryKeySet, primaryKeySet, primarySize, primaryValues, primaryValues, printMemoryStats, projection, projection, promote, promote, promoteAll, put, putAllConflict, putAllConflictAsync, putAsync, putxAsync, queries, randomEntry, readExternal, readResolve, readThroughAllAsync, reload, reloadAllAsync0, reloadAsync, remove, removeAllConflict, removeAllConflictAsync, removeAsync, removeEntry, removeIfObsolete, removex, removexAsync, saveFuture, size, size, sizeAsync, splitClearLocally, start, startInfo, stop, stopInfo, swapIterator, swapKeys, swapSize, toMap, toString, tryPutIfAbsent, tx, txStart, txStart, txStart, txStartEx, txSynchronizations, txSynchronize, txUnsynchronize, unlock, validateCacheKey, validateCacheKeys, values, values, withExpiryPolicy, writeExternalpublic GridLocalAtomicCache()
Externalizable.public GridLocalAtomicCache(GridCacheContext<K,V> ctx)
ctx - Cache context.protected void init()
init in class GridCacheAdapter<K,V>public boolean isLocal()
isLocal in class GridCacheAdapter<K,V>True if cache is local.public GridCachePreloader<K,V> preloader()
preloader in class GridCacheAdapter<K,V>public V put(K key, V val, @Nullable GridCacheEntryEx cached, long ttl, @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException
CacheEntryImpl.put in interface GridCacheProjectionEx<K,V>put in class GridCacheAdapter<K,V>key - Key.val - Value.cached - Cached entry. If not provided, equivalent to {CacheProjection#put}.ttl - Optional time-to-live. If negative, leaves ttl value unchanged.filter - Optional filter.IgniteCheckedException - If failed.public boolean putx(K key, V val, @Nullable GridCacheEntryEx cached, long ttl, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException
CacheEntryImpl.putx in interface GridCacheProjectionEx<K,V>putx in class GridCacheAdapter<K,V>key - Key.val - Value.cached - Cached entry. If not provided, equivalent to {CacheProjection#put}.ttl - Optional time-to-live. If negative, leaves ttl value unchanged.filter - Optional filter.IgniteCheckedException - If failed.public boolean putx(K key, V val, CacheEntryPredicate[] filter) throws IgniteCheckedException
This method will return true if value is stored in cache and false otherwise.
Unlike #put(Object, Object, org.apache.ignite.lang.IgnitePredicate[]) method, it does not return previous
value and, therefore, does not have any overhead associated with returning a value. It
should be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.putx in interface CacheProjection<K,V>putx in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.filter - Optional filter to check prior to putting value in cache. Note
that filter check is atomic with put operation.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> putAsync(K key, V val, @Nullable GridCacheEntryEx entry, long ttl, @Nullable CacheEntryPredicate... filter)
CacheEntryImpl.putAsync in interface GridCacheProjectionEx<K,V>putAsync in class GridCacheAdapter<K,V>key - Key.val - Value.entry - Optional cached entry.ttl - Optional time-to-live value. If negative, leaves ttl value unchanged.filter - Optional filter.public IgniteInternalFuture<Boolean> putxAsync(K key, V val, @Nullable GridCacheEntryEx entry, long ttl, @Nullable CacheEntryPredicate... filter)
CacheEntryImpl.putxAsync in interface GridCacheProjectionEx<K,V>putxAsync in class GridCacheAdapter<K,V>key - Key.val - Value.entry - Cached entry. If not provided, equivalent to {CacheProjection#put}.ttl - Optional time-to-live. If negative, leave ttl value unchanged.filter - Optional filter.public V putIfAbsent(K key, V val) throws IgniteCheckedException
CacheMode.PARTITIONED or CacheMode.REPLICATED caches,
the value will be loaded from the primary node, which in its turn may load the value
from the swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method CacheProjection.putxIfAbsent(Object, Object) should
always be used instead of this one to avoid the overhead associated with returning of the
previous value.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.putIfAbsent in interface CacheProjection<K,V>putIfAbsent in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.IgniteCheckedException - If put operation failed.public IgniteInternalFuture<V> putIfAbsentAsync(K key, V val)
CacheMode.PARTITIONED or CacheMode.REPLICATED caches,
the value will be loaded from the primary node, which in its turn may load the value
from the swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method CacheProjection.putxIfAbsentAsync(Object, Object) should
always be used instead of this one to avoid the overhead associated with returning of the
previous value.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.putIfAbsentAsync in interface CacheProjection<K,V>putIfAbsentAsync in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.public boolean putxIfAbsent(K key, V val) throws IgniteCheckedException
This method will return true if value is stored in cache and false otherwise.
Unlike CacheProjection.putIfAbsent(Object, Object) method, it does not return previous
value and, therefore, does not have any overhead associated with returning of a value. It
should always be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.putxIfAbsent in interface CacheProjection<K,V>putxIfAbsent in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.true if value is stored in cache and false otherwise.IgniteCheckedException - If put operation failed.public IgniteInternalFuture<Boolean> putxIfAbsentAsync(K key, V val)
This method will return true if value is stored in cache and false otherwise.
Unlike CacheProjection.putIfAbsent(Object, Object) method, it does not return previous
value and, therefore, does not have any overhead associated with returning of a value. It
should always be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.putxIfAbsentAsync in interface CacheProjection<K,V>putxIfAbsentAsync in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.public V replace(K key, V val) throws IgniteCheckedException
CacheMode.PARTITIONED or CacheMode.REPLICATED caches,
the value will be loaded from the primary node, which in its turn may load the value
from the swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method CacheProjection.replacex(Object, Object) should
always be used instead of this one to avoid the overhead associated with returning of the
previous value.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.replace in interface CacheProjection<K,V>replace in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.IgniteCheckedException - If replace operation failed.public IgniteInternalFuture<V> replaceAsync(K key, V val)
CacheMode.PARTITIONED caches, the value will be loaded from the primary node,
which in its turn may load the value from the swap storage, and consecutively, if it's not in swap,
from the underlying persistent storage. If value has to be loaded from persistent
storage, CacheStore#load(Transaction, Object) method will be used.
If the returned value is not needed, method CacheProjection.replacex(Object, Object) should
always be used instead of this one to avoid the overhead associated with returning of the
previous value.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.replaceAsync in interface CacheProjection<K,V>replaceAsync in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.public boolean replacex(K key, V val) throws IgniteCheckedException
This method will return true if value is stored in cache and false otherwise.
Unlike CacheProjection.replace(Object, Object) method, it does not return previous
value and, therefore, does not have any overhead associated with returning of a value. It
should always be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.replacex in interface CacheProjection<K,V>replacex in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.True if replace happened, false otherwise.IgniteCheckedException - If replace operation failed.public IgniteInternalFuture<Boolean> replacexAsync(K key, V val)
This method will return true if value is stored in cache and false otherwise.
Unlike CacheProjection.replaceAsync(Object, Object) method, it does not return previous
value and, therefore, does not have any overhead associated with returning of a value. It
should always be used whenever return value is not required.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.replacexAsync in interface CacheProjection<K,V>replacexAsync in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException
'oldVal' passed in.
This method will return true if value is stored in cache and false otherwise.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.replace in interface CacheProjection<K,V>replace in class GridCacheAdapter<K,V>key - Key to store in cache.oldVal - Old value to match.newVal - Value to be associated with the given key.True if replace happened, false otherwise.IgniteCheckedException - If replace operation failed.public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V newVal)
'oldVal' passed in.
This method will return true if value is stored in cache and false otherwise.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheStore#put(Transaction, Object, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.replaceAsync in interface CacheProjection<K,V>replaceAsync in class GridCacheAdapter<K,V>key - Key to store in cache.oldVal - Old value to match.newVal - Value to be associated with the given key.public GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException
'oldVal' passed in.
This method will return true if value is stored in cache and false otherwise.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheWriter.write(javax.cache.Cache.Entry) method.
CacheFlag.LOCAL, CacheFlag.READ.replacex in interface GridCacheProjectionEx<K,V>replacex in class GridCacheAdapter<K,V>key - Key to store in cache.oldVal - Old value to match.newVal - Value to be associated with the given key.IgniteCheckedException - If replace operation failed.public GridCacheReturn removex(K key, V val) throws IgniteCheckedException
If write-through is enabled, the value will be removed from CacheStore
via CacheWriter.delete(Object) method.
CacheFlag.LOCAL, CacheFlag.READ.removex in interface GridCacheProjectionEx<K,V>removex in class GridCacheAdapter<K,V>key - Key whose mapping is to be removed from cache.val - Value to match against currently cached value.IgniteCheckedException - If remove failed.public IgniteInternalFuture<GridCacheReturn> removexAsync(K key, V val)
This method will return true if remove did occur, which means that all optionally
provided filters have passed and there was something to remove, false otherwise.
If write-through is enabled, the value will be removed from CacheStore
via CacheWriter.delete(Object) method.
CacheFlag.LOCAL, CacheFlag.READ.removexAsync in interface GridCacheProjectionEx<K,V>removexAsync in class GridCacheAdapter<K,V>key - Key whose mapping is to be removed from cache.val - Value to match against currently cached value.public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal)
'oldVal' passed in.
This method will return true if value is stored in cache and false otherwise.
If write-through is enabled, the stored value will be persisted to CacheStore
via CacheWriter.write(javax.cache.Cache.Entry) method.
CacheFlag.LOCAL, CacheFlag.READ.replacexAsync in interface GridCacheProjectionEx<K,V>replacexAsync in class GridCacheAdapter<K,V>key - Key to store in cache.oldVal - Old value to match.newVal - Value to be associated with the given key.public void putAll(Map<? extends K,? extends V> m, CacheEntryPredicate[] filter) throws IgniteCheckedException
If write-through is enabled, the stored values will be persisted to CacheStore
via CacheStore#putAll(Transaction, Map) method.
CacheFlag.LOCAL, CacheFlag.READ.putAll in interface CacheProjection<K,V>putAll in class GridCacheAdapter<K,V>m - Key-value pairs to store in cache.filter - Optional entry filter. If provided, then entry will
be stored only if the filter returned true.IgniteCheckedException - If put operation failed.public IgniteInternalFuture<?> putAllAsync(Map<? extends K,? extends V> m, @Nullable CacheEntryPredicate[] filter)
If write-through is enabled, the stored values will be persisted to CacheStore
via CacheStore#putAll(Transaction, Map) method.
CacheFlag.LOCAL, CacheFlag.READ.putAllAsync in interface CacheProjection<K,V>putAllAsync in class GridCacheAdapter<K,V>m - Key-value pairs to store in cache.filter - Optional entry filter. If provided, then entry will
be stored only if the filter returned true.public V remove(K key, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException
CacheEntryImpl.remove in interface GridCacheProjectionEx<K,V>remove in class GridCacheAdapter<K,V>key - Key to remove.entry - Cached entry. If not provided, equivalent to {CacheProjection#put}.filter - Optional filter.IgniteCheckedException - If failed.public IgniteInternalFuture<V> removeAsync(K key, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter)
CacheEntryImpl.removeAsync in interface GridCacheProjectionEx<K,V>removeAsync in class GridCacheAdapter<K,V>key - Key to remove.entry - Optional cached entry.filter - Optional filter.public void removeAll(Collection<? extends K> keys, CacheEntryPredicate... filter) throws IgniteCheckedException
If write-through is enabled, the values will be removed from CacheStore
via @link CacheStore#removeAll(Transaction, Collection) method.
CacheFlag.LOCAL, CacheFlag.READ.removeAll in interface CacheProjection<K,V>removeAll in class GridCacheAdapter<K,V>keys - Keys whose mappings are to be removed from cache.filter - Optional filter to check prior to removing value form cache. Note
that filter is checked atomically together with remove operation.IgniteCheckedException - If remove failed.public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys, CacheEntryPredicate[] filter)
If write-through is enabled, the values will be removed from CacheStore
via @link CacheStore#removeAll(Transaction, Collection) method.
CacheFlag.LOCAL, CacheFlag.READ.removeAllAsync in interface CacheProjection<K,V>removeAllAsync in class GridCacheAdapter<K,V>keys - Keys whose mappings are to be removed from cache.filter - Optional filter to check prior to removing value form cache. Note
that filter is checked atomically together with remove operation.public boolean removex(K key, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException
CacheEntryImpl.removex in interface GridCacheProjectionEx<K,V>removex in class GridCacheAdapter<K,V>key - Key to remove.entry - Cached entry. If not provided, equivalent to {CacheProjection#put}.filter - Optional filter.IgniteCheckedException - If failed.public IgniteInternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter)
CacheEntryImpl.removexAsync in interface GridCacheProjectionEx<K,V>removexAsync in class GridCacheAdapter<K,V>key - Key to remove.entry - Cached entry. If not provided, equivalent to {CacheProjection#put}.filter - Optional filter.public boolean remove(K key, V val) throws IgniteCheckedException
If write-through is enabled, the value will be removed from CacheStore
via CacheStore#remove(Transaction, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.remove in interface CacheProjection<K,V>remove in class GridCacheAdapter<K,V>key - Key whose mapping is to be removed from cache.val - Value to match against currently cached value.True if entry was removed and passed in value matched the cached one,
false otherwise.IgniteCheckedException - If remove failed.public IgniteInternalFuture<Boolean> removeAsync(K key, V val)
This method will return true if remove did occur, which means that all optionally
provided filters have passed and there was something to remove, false otherwise.
If write-through is enabled, the value will be removed from CacheStore
via CacheStore#remove(Transaction, Object) method.
CacheFlag.LOCAL, CacheFlag.READ.removeAsync in interface CacheProjection<K,V>removeAsync in class GridCacheAdapter<K,V>key - Key whose mapping is to be removed from cache.val - Value to match against currently cached value.true
if currently cached value will match the passed in one.public void removeAll()
throws IgniteCheckedException
null, then all entries in cache will be enrolled
into transaction.
USE WITH CARE - if your cache has many entries that pass through the filter or if filter is empty, then transaction will quickly become very heavy and slow. Also, locks are acquired in undefined order, so it may cause a deadlock when used with other concurrent transactional updates.
If write-through is enabled, the values will be removed from CacheStore
via @link CacheStore#removeAll(Transaction, Collection) method.
CacheFlag.LOCAL, CacheFlag.READ.IgniteCheckedException - If remove failed.public IgniteInternalFuture<?> removeAllAsync()
@Nullable public V get(K key, boolean deserializePortable) throws IgniteCheckedException
get in class GridCacheAdapter<K,V>key - Key.deserializePortable - Deserialize portable flag.IgniteCheckedException - If failed.public final Map<K,V> getAll(Collection<? extends K> keys, boolean deserializePortable) throws IgniteCheckedException
getAll in class GridCacheAdapter<K,V>keys - Keys.deserializePortable - Deserialize portable flag.IgniteCheckedException - If read failed.public IgniteInternalFuture<Map<K,V>> getAllAsync(@Nullable Collection<? extends K> keys, boolean forcePrimary, boolean skipTx, @Nullable GridCacheEntryEx entry, @Nullable UUID subjId, String taskName, boolean deserializePortable, boolean skipVals)
getAllAsync in class GridCacheAdapter<K,V>keys - Keys.forcePrimary - Force primary.skipTx - Skip tx.entry - Entry.subjId - Subj Id.taskName - Task name.deserializePortable - Deserialize portable.skipVals - Skip values.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 GridCacheProjectionEx<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 GridCacheProjectionEx<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 GridCacheProjectionEx<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 GridCacheProjectionEx<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 GridCacheProjectionEx<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 GridCacheProjectionEx<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 accessTtl, CacheEntryPredicate[] filter)
txLockAsync in class GridCacheAdapter<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.accessTtl - TTL for read operation.filter - Optional filter.public IgniteInternalFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout, @Nullable CacheEntryPredicate... filter)
TransactionConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.
CacheFlag.LOCAL, CacheFlag.READ.keys - Keys to lock.timeout - Timeout in milliseconds to wait for lock to be acquired
('0' for no expiration).filter - Optional filter that needs to atomically pass in order for the locks
to be acquired.true if all filters passed and locks were acquired before
timeout has expired, false otherwise.public void unlockAll(@Nullable Collection<? extends K> keys, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException
TransactionConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.
CacheFlag.LOCAL, CacheFlag.READ.keys - Keys to unlock.filter - Optional filter which needs to pass for individual entries
to be unlocked.IgniteCheckedException - If unlock execution resulted in error.protected IgniteInternalFuture asyncOp(Callable<?> op)
op - Operation closure.public void onDeferredDelete(GridCacheEntryEx entry, GridCacheVersion ver)
onDeferredDelete in class GridCacheAdapter<K,V>entry - Entry.ver - Version.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0 Release Date : March 31 2015