public class GridNearAtomicCache<K,V> extends GridNearCacheAdapter<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 |
|---|
GridNearAtomicCache()
Empty constructor required for
Externalizable. |
GridNearAtomicCache(GridCacheContext<K,V> ctx) |
| Modifier and Type | Method and Description |
|---|---|
GridDhtCacheAdapter<K,V> |
dht() |
void |
dht(GridDhtAtomicCache<K,V> dht) |
protected IgniteInternalFuture<Map<K,V>> |
getAllAsync(Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
GridCacheEntryEx entry,
UUID subjId,
String taskName,
boolean deserializePortable,
boolean skipVals) |
<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) |
void |
localRemoveAll() |
IgniteInternalFuture<?> |
localRemoveAll(CacheEntryPredicate filter) |
protected IgniteInternalFuture<Boolean> |
lockAllAsync(Collection<KeyCacheObject> keys,
long timeout,
IgniteTxLocalEx tx,
boolean isInvalidate,
boolean isRead,
boolean retval,
TransactionIsolation isolation,
long accessTtl,
CacheEntryPredicate[] filter) |
void |
onDeferredDelete(GridCacheEntryEx entry,
GridCacheVersion ver) |
void |
processDhtAtomicUpdateRequest(UUID nodeId,
GridDhtAtomicUpdateRequest req,
GridDhtAtomicUpdateResponse res) |
void |
processNearAtomicUpdateResponse(GridNearAtomicUpdateRequest req,
GridNearAtomicUpdateResponse res) |
V |
put(K key,
V val,
GridCacheEntryEx cached,
long ttl,
CacheEntryPredicate[] filter)
Internal method that is called from
GridCacheEntryImpl. |
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.
|
void |
putAllConflict(Map<KeyCacheObject,GridCacheDrInfo> drMap)
Store DR data.
|
IgniteInternalFuture<?> |
putAllConflictAsync(Map<KeyCacheObject,GridCacheDrInfo> drMap)
Store DR data asynchronously.
|
IgniteInternalFuture<V> |
putAsync(K key,
V val,
GridCacheEntryEx entry,
long ttl,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
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
GridCacheEntryImpl. |
IgniteInternalFuture<Boolean> |
putxAsync(K key,
V val,
GridCacheEntryEx entry,
long ttl,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
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
GridCacheEntryImpl. |
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.
|
void |
removeAllConflict(Map<KeyCacheObject,GridCacheVersion> drMap)
Removes DR data.
|
IgniteInternalFuture<?> |
removeAllConflictAsync(Map<KeyCacheObject,GridCacheVersion> drMap)
Removes DR data asynchronously.
|
IgniteInternalFuture<V> |
removeAsync(K key,
GridCacheEntryEx entry,
CacheEntryPredicate... filter)
Internal method that is called from
GridCacheEntryImpl. |
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
GridCacheEntryImpl. |
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
GridCacheEntryImpl. |
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. |
void |
start()
Starts this cache.
|
void |
unlockAll(Collection<? extends K> keys,
CacheEntryPredicate... filter)
Unlocks given keys only if current thread owns the locks.
|
clearLocally0, clearLocally0, entry, entryEx, entryEx, entryExx, entrySet, entrySet, evict, evictAll, evictNearOnly, igfsDataSpaceMax, igfsDataSpaceUsed, init, isAllLockedNearOnly, isIgfsDataCache, isLocked, isLockedNearOnly, isMongoDataCache, isMongoMetaCache, isNear, keySet, loadAsync, localLoad, localLoadCache, localLoadCacheAsync, nearEntries, nearEntriesIterator, nearKeySet, nearSize, offHeapAllocatedSize, offHeapEntriesCount, offHeapIterator, onIgfsDataSizeChanged, peek, peek, peekExx, peekNearOnly, preloader, primaryEntrySet, primaryKeySet, primarySize, primaryValues, processGetResponse, promote, promote, promoteAll, randomEntry, readThroughAllAsync, reload, size, splitClearLocally, swapIterator, swapKeys, swapSize, toString, valueslockAllAsync, removeVersionedEntry, txLockAsyncaffinity, allEntries, asyncOp, asyncOpAcquire, asyncOpRelease, awaitLastFut, cache, checkJta, clear, clear, clear, clearAll, clearAsync, clearAsync, clearAsync, clearLocally, clearLocally, clearLocally, clearLocallyAll, commitTxAsync, configuration, containsKey, containsKeyAsync, containsKeys, containsKeysAsync, containsValue, context, entries, entryEx, entryEx, entryExSafe, entrySet, entrySetx, evict, evictAll, evictAll, expiry, expiryPolicy, flags, flagsOff, flagsOn, forceRepartition, forSubjectId, get, get, get, getAll, getAll, getAllAsync, getAllAsync, getAllAsync, getAllAsync0, getAllOutTx, getAllOutTxAsync, getAsync, getAsync, getForcePrimary, getForcePrimaryAsync, globalPrimarySize, globalSize, gridProjection, igniteIterator, isColocated, isDht, isDhtAtomic, isEmpty, isLocal, isLockedByThread, iterator, iterator, keepPortable, keepPortable0, keySet, loadAll, localEntries, localPeek, localSize, lock, lockAll, lockAsync, log, map, metrics, metrics0, mxBean, name, onKernalStart, onKernalStop, onUndeploy, overflowSize, peek, peek0, peek0, peek0, peekAll0, peekEx, peekEx, predicate, primaryEntrySet, primaryEntrySetx, primaryKeySet, primaryValues, printMemoryStats, projection, projection, put, putAsync, putxAsync, queries, readExternal, readResolve, reloadAllAsync0, reloadAsync, remove, removeAsync, removeEntry, removeIfObsolete, removex, removexAsync, saveFuture, size, sizeAsync, startInfo, stop, stopInfo, toMap, tx, txStart, txStart, txStart, txStartEx, txSynchronizations, txSynchronize, txUnsynchronize, unlock, validateCacheKey, validateCacheKeys, values, withExpiryPolicy, writeExternalpublic GridNearAtomicCache()
Externalizable.public GridNearAtomicCache(GridCacheContext<K,V> ctx)
ctx - Context.public void start()
throws IgniteCheckedException
start in class GridCacheAdapter<K,V>IgniteCheckedException - If start failed.public void dht(GridDhtAtomicCache<K,V> dht)
dht - DHT cache.public GridDhtCacheAdapter<K,V> dht()
dht in class GridNearCacheAdapter<K,V>public void processNearAtomicUpdateResponse(GridNearAtomicUpdateRequest req, GridNearAtomicUpdateResponse res)
req - Update request.res - Update response.public void processDhtAtomicUpdateRequest(UUID nodeId, GridDhtAtomicUpdateRequest req, GridDhtAtomicUpdateResponse res)
nodeId - Sender node ID.req - Dht atomic update request.res - Dht atomic update response.protected 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>public V put(K key, V val, @Nullable GridCacheEntryEx cached, long ttl, @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException
GridCacheEntryImpl.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
GridCacheEntryImpl.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)
GridCacheEntryImpl.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)
GridCacheEntryImpl.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 removex(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.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 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 CacheStore#put(Transaction, Object, Object) 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 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 CacheStore#remove(Transaction, 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 CacheStore#put(Transaction, Object, Object) 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 void putAllConflict(Map<KeyCacheObject,GridCacheDrInfo> drMap) throws IgniteCheckedException
putAllConflict in interface GridCacheProjectionEx<K,V>putAllConflict in class GridCacheAdapter<K,V>drMap - DR map.IgniteCheckedException - If put operation failed.public IgniteInternalFuture<?> putAllConflictAsync(Map<KeyCacheObject,GridCacheDrInfo> drMap) throws IgniteCheckedException
putAllConflictAsync in interface GridCacheProjectionEx<K,V>putAllConflictAsync in class GridCacheAdapter<K,V>drMap - DR map.IgniteCheckedException - If put operation failed.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<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 <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> 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(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 V remove(K key, @Nullable GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter) throws IgniteCheckedException
GridCacheEntryImpl.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)
GridCacheEntryImpl.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 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 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
GridCacheEntryImpl.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)
GridCacheEntryImpl.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 CacheStore#removeAll(Transaction, Collection) method.
CacheFlag.LOCAL, CacheFlag.READ.removeAll in interface CacheProjection<K,V>removeAll in class GridDistributedCacheAdapter<K,V>IgniteCheckedException - If remove failed.public IgniteInternalFuture<?> removeAllAsync()
removeAllAsync in interface CacheProjection<K,V>removeAllAsync in class GridDistributedCacheAdapter<K,V>public void localRemoveAll()
throws IgniteCheckedException
localRemoveAll in interface CacheProjection<K,V>localRemoveAll in class GridCacheAdapter<K,V>IgniteCheckedException - If failed.public IgniteInternalFuture<?> localRemoveAll(CacheEntryPredicate filter)
localRemoveAll in class GridCacheAdapter<K,V>filter - Filter.public void removeAllConflict(Map<KeyCacheObject,GridCacheVersion> drMap) throws IgniteCheckedException
removeAllConflict in interface GridCacheProjectionEx<K,V>removeAllConflict in class GridCacheAdapter<K,V>drMap - DR map.IgniteCheckedException - If remove failed.public IgniteInternalFuture<?> removeAllConflictAsync(Map<KeyCacheObject,GridCacheVersion> drMap) throws IgniteCheckedException
removeAllConflictAsync in interface GridCacheProjectionEx<K,V>removeAllConflictAsync in class GridCacheAdapter<K,V>drMap - DR map.IgniteCheckedException - If remove failed.protected IgniteInternalFuture<Boolean> lockAllAsync(Collection<KeyCacheObject> keys, long timeout, @Nullable IgniteTxLocalEx tx, boolean isInvalidate, boolean isRead, boolean retval, @Nullable TransactionIsolation isolation, long accessTtl, CacheEntryPredicate[] filter)
lockAllAsync in class GridDistributedCacheAdapter<K,V>keys - Keys to lock.timeout - Timeout.tx - TransactionisInvalidate - Invalidation flag.isRead - Indicates whether value is read or written.retval - Flag to return value.isolation - Transaction isolation.accessTtl - TTL for read operation.filter - Optional filter.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.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-RC3 Release Date : March 24 2015