@GridToStringExclude public class GridDhtAtomicCache<K,V> extends GridDhtCacheAdapter<K,V>
GridCacheAdapter.AsyncOp<T>, GridCacheAdapter.CacheExpiryPolicy, GridCacheAdapter.FutureHolder, GridCacheAdapter.TopologyVersionAwareJob, GridCacheAdapter.UpdateGetTimeStatClosure<T>, GridCacheAdapter.UpdatePutAndGetTimeStatClosure<T>, GridCacheAdapter.UpdatePutTimeStatClosure<T>, GridCacheAdapter.UpdateRemoveTimeStatClosure<T>, GridCacheAdapter.UpdateTimeStatClosure<T>preldrcacheCfg, CLEAR_ALL_SPLIT_THRESHOLD, clusterMxBean, ctx, gridCfg, keyCheck, lastFut, LOAD_CACHE_JOB_SINCE, LOAD_CACHE_JOB_V2_SINCE, localMxBean, locNodeId, log, map, MAX_RETRIES, metrics, RET2NULL| Constructor and Description |
|---|
GridDhtAtomicCache()
Empty constructor required by
Externalizable. |
GridDhtAtomicCache(GridCacheContext<K,V> ctx) |
GridDhtAtomicCache(GridCacheContext<K,V> ctx,
GridCacheConcurrentMap map) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> IgniteInternalFuture<T> |
asyncOp(CO<IgniteInternalFuture<T>> op) |
protected GridCacheMapEntryFactory |
entryFactory() |
protected V |
get(K key,
String taskName,
boolean deserializeBinary,
boolean needVer) |
IgniteInternalFuture<Map<K,V>> |
getAllAsync(Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
UUID subjId,
String taskName,
boolean deserializeBinary,
boolean skipVals,
boolean canRemap,
boolean needVer)
This method is used internally.
|
V |
getAndPut(K key,
V val,
CacheEntryPredicate filter) |
IgniteInternalFuture<V> |
getAndPutAsync0(K key,
V val,
CacheEntryPredicate filter) |
V |
getAndPutIfAbsent(K key,
V val)
Stores given key-value pair in cache only if cache had no previous mapping for it.
|
IgniteInternalFuture<V> |
getAndPutIfAbsentAsync(K key,
V val)
Asynchronously stores given key-value pair in cache only if cache had no previous mapping for it.
|
V |
getAndRemove(K key)
Removes given key mapping from cache.
|
IgniteInternalFuture<V> |
getAndRemoveAsync(K key)
Asynchronously removes given key mapping from cache.
|
V |
getAndReplace(K key,
V val)
Stores given key-value pair in cache only if there is a previous mapping for it.
|
IgniteInternalFuture<V> |
getAndReplaceAsync(K key,
V val)
Asynchronously stores given key-value pair in cache only if there is a previous mapping for it.
|
protected IgniteInternalFuture<V> |
getAsync(K key,
boolean forcePrimary,
boolean skipTx,
UUID subjId,
String taskName,
boolean deserializeBinary,
boolean skipVals,
boolean canRemap,
boolean needVer) |
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 |
isDhtAtomic() |
boolean |
isFastMap(CacheEntryPredicate[] filters,
GridCacheOperation op)
Whether this is fast-map operation.
|
protected IgniteInternalFuture<Boolean> |
lockAllAsync(Collection<KeyCacheObject> keys,
long timeout,
IgniteTxLocalEx tx,
boolean isInvalidate,
boolean isRead,
boolean retval,
TransactionIsolation isolation,
long accessTtl) |
GridNearCacheAdapter<K,V> |
near() |
void |
near(GridNearAtomicCache<K,V> near) |
boolean |
put(K key,
V val,
CacheEntryPredicate filter) |
void |
putAll(Map<? extends K,? extends V> m)
Stores given key-value pairs in cache.
|
IgniteInternalFuture<?> |
putAllAsync(Map<? extends K,? extends V> m)
Asynchronously stores given key-value pairs in cache.
|
void |
putAllConflict(Map<KeyCacheObject,GridCacheDrInfo> conflictMap)
Store DR data.
|
IgniteInternalFuture<?> |
putAllConflictAsync(Map<KeyCacheObject,GridCacheDrInfo> conflictMap)
Store DR data asynchronously.
|
IgniteInternalFuture<Boolean> |
putAsync0(K key,
V val,
CacheEntryPredicate filter) |
boolean |
putIfAbsent(K key,
V val)
Stores given key-value pair in cache only if cache had no previous mapping for it.
|
IgniteInternalFuture<Boolean> |
putIfAbsentAsync(K key,
V val)
Asynchronously stores given key-value pair in cache only if cache had no previous mapping for it.
|
boolean |
remove(K key)
Removes given key mapping from cache.
|
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(Collection<? extends K> keys)
Removes given key mappings from cache.
|
IgniteInternalFuture<?> |
removeAllAsync(Collection<? extends K> keys)
Asynchronously removes given key mappings from cache for entries.
|
void |
removeAllConflict(Map<KeyCacheObject,GridCacheVersion> conflictMap)
Removes DR data.
|
IgniteInternalFuture<?> |
removeAllConflictAsync(Map<KeyCacheObject,GridCacheVersion> conflictMap)
Removes DR data asynchronously.
|
IgniteInternalFuture<Boolean> |
removeAsync(K key,
CacheEntryPredicate filter) |
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 |
replace(K key,
V val)
Stores given key-value pair in cache only if 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<Boolean> |
replaceAsync(K key,
V val)
Asynchronously stores given key-value pair in cache only if 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. |
void |
start()
Starts this cache.
|
void |
stop()
Stops this cache.
|
String |
toString() |
V |
tryGetAndPut(K key,
V val)
Tries to get and put value in cache.
|
void |
updateAllAsyncInternal(UUID nodeId,
GridNearAtomicUpdateRequest req,
CI2<GridNearAtomicUpdateRequest,GridNearAtomicUpdateResponse> completionCb)
Executes local update.
|
void |
updateAllAsyncInternal0(UUID nodeId,
GridNearAtomicUpdateRequest req,
CI2<GridNearAtomicUpdateRequest,GridNearAtomicUpdateResponse> completionCb)
Executes local update after preloader fetched values.
|
beginMultiUpdate, createEntry, dhtPreloader, endMultiUpdate, entryEx, entryEx, entryExx, entryExx, entrySet, getDhtAsync, localEntriesIterator, localLoad, localLoadCache, multiUpdateFinishFuture, multiUpdateTopologyFuture, needRemap, onDeferredDelete, onKernalStart, onKernalStop, onReconnected, peekExx, preloader, primarySize, primarySizeLong, printMemoryStats, processNearGetRequest, processNearGetResponse, processNearSingleGetRequest, processNearSingleGetResponse, sendTtlUpdateRequest, splitClearLocally, topology, unlockAlllockAllAsync, removeAll, removeAllAsync, removeVersionedEntry, txLockAsyncaffinity, allEntries, asyncOp, asyncOpAcquire, asyncOpRelease, awaitLastFut, cache, checkJta, clear, clear, clearAll, clearAllAsync, clearAsync, clearAsync, clearLocally, clearLocally, clearLocally, clearLocallyAll, clusterMetrics, clusterMetrics, clusterMxBean, commitTxAsync, configuration, containsKey, containsKeyAsync, containsKeys, containsKeysAsync, context, decrementSize, entries, entryEx, entryEx, entryExSafe, entrySet, entrySet, entrySetx, evict, evictAll, expiry, expiryPolicy, forSubjectId, get, get, getAll, getAll, getAllAsync, getAllAsync, getAllAsync, getAllAsync0, getAllOutTx, getAllOutTxAsync, getAndPut, getAndPutAsync, getAndPutAsync, getAsync, getAsync, getEntries, getEntriesAsync, getEntry, getEntryAsync, getForcePrimary, getForcePrimaryAsync, getTopologySafe, igfsDataSpaceMax, igfsDataSpaceUsed, igniteIterator, incrementSize, invoke, isColocated, isDht, isEmpty, isIgfsDataCache, isLocal, isLocked, isLockedByThread, isMongoDataCache, isMongoMetaCache, isNear, iterator, iterator, keepBinary, keySet, keySetx, loadAll, localEntries, localLoadCacheAsync, localMetrics, localMxBean, localPeek, localSize, localSizeLong, lock, lockAll, lockAsync, log, map, metrics0, name, nearSize, offHeapAllocatedSize, offHeapEntriesCount, onIgfsDataSizeChanged, onUndeploy, overflowSize, peekEx, peekEx, primaryEntrySet, primaryKeySet, promote, promoteAll, put, putAsync, putAsync, randomEntry, readExternal, readResolve, rebalance, removeAsync, removeEntry, removeIfObsolete, saveFuture, setSkipStore, size, size, sizeAsync, sizeLong, sizeLong, sizeLongAsync, skipStore, startInfo, stopInfo, swapKeys, swapSize, tx, txStart, txStart, txStartEx, unlock, validateCacheKey, validateCacheKeys, values, values, withExpiryPolicy, withNoRetries, writeExternalpublic GridDhtAtomicCache()
Externalizable.public GridDhtAtomicCache(GridCacheContext<K,V> ctx)
ctx - Cache context.public GridDhtAtomicCache(GridCacheContext<K,V> ctx, GridCacheConcurrentMap map)
ctx - Cache context.map - Cache concurrent map.public boolean isDhtAtomic()
isDhtAtomic in class GridCacheAdapter<K,V>True if cache is DHT Atomic.protected GridCacheMapEntryFactory entryFactory()
entryFactory in class GridDhtCacheAdapter<K,V>protected void init()
init in class GridDhtCacheAdapter<K,V>public void start()
throws IgniteCheckedException
start in class GridDhtCacheAdapter<K,V>IgniteCheckedException - If start failed.public void stop()
stop in class GridDhtCacheAdapter<K,V>public void near(GridNearAtomicCache<K,V> near)
near - Near cache.public GridNearCacheAdapter<K,V> near()
near in class GridDhtCacheAdapter<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.protected IgniteInternalFuture<V> getAsync(K key, boolean forcePrimary, boolean skipTx, @Nullable UUID subjId, String taskName, boolean deserializeBinary, boolean skipVals, boolean canRemap, boolean needVer)
getAsync in class GridCacheAdapter<K,V>key - Key.forcePrimary - Force primary.skipTx - Skip tx.subjId - Subj Id.taskName - Task name.deserializeBinary - Deserialize binary.skipVals - Skip values.canRemap - Can remap flag.needVer - Need version.public IgniteInternalFuture<Map<K,V>> getAllAsync(@Nullable Collection<? extends K> keys, boolean forcePrimary, boolean skipTx, @Nullable UUID subjId, String taskName, boolean deserializeBinary, boolean skipVals, boolean canRemap, boolean needVer)
GridDhtCacheAdapter.getDhtAsync(UUID, long, Map, boolean, AffinityTopologyVersion, UUID, int, IgniteCacheExpiryPolicy, boolean)
method instead to retrieve DHT value.getAllAsync in class GridDhtCacheAdapter<K,V>keys - Keys.forcePrimary - Force primary.skipTx - Skip tx.subjId - Subj Id.taskName - Task name.deserializeBinary - Deserialize binary.skipVals - Skip values.canRemap - Can remap flag.needVer - Need version.GridCacheAdapter.getAllAsync(Collection)public V getAndPut(K key, V val, @Nullable CacheEntryPredicate filter) throws IgniteCheckedException
getAndPut in class GridCacheAdapter<K,V>key - Key.val - Value.filter - Optional filter.IgniteCheckedException - If failed.public boolean put(K key, V val, CacheEntryPredicate filter) throws IgniteCheckedException
put 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.public V tryGetAndPut(K key, V val) throws IgniteCheckedException
GridCacheTryPutFailedException
if topology exchange is in progress.tryGetAndPut in interface IgniteInternalCache<K,V>tryGetAndPut in class GridCacheAdapter<K,V>key - Key.val - value.IgniteCheckedException - In case of error.public V getAndPutIfAbsent(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 IgniteInternalCache.putIfAbsent(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.
getAndPutIfAbsent in interface IgniteInternalCache<K,V>getAndPutIfAbsent 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> getAndPutIfAbsentAsync(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 IgniteInternalCache.putIfAbsentAsync(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.
getAndPutIfAbsentAsync in interface IgniteInternalCache<K,V>getAndPutIfAbsentAsync in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.public boolean putIfAbsent(K key, V val) throws IgniteCheckedException
This method will return true if value is stored in cache and false otherwise.
Unlike IgniteInternalCache.getAndPutIfAbsent(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.
putIfAbsent in interface IgniteInternalCache<K,V>putIfAbsent 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> putIfAbsentAsync(K key, V val)
This method will return true if value is stored in cache and false otherwise.
Unlike IgniteInternalCache.getAndPutIfAbsent(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.
putIfAbsentAsync in interface IgniteInternalCache<K,V>putIfAbsentAsync in class GridCacheAdapter<K,V>key - Key to store in cache.val - Value to be associated with the given key.public V getAndReplace(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 IgniteInternalCache.replace(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.
getAndReplace in interface IgniteInternalCache<K,V>getAndReplace 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> getAndReplaceAsync(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 IgniteInternalCache.replace(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.
getAndReplaceAsync in interface IgniteInternalCache<K,V>getAndReplaceAsync 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 val) throws IgniteCheckedException
This method will return true if value is stored in cache and false otherwise.
Unlike IgniteInternalCache.getAndReplace(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.
replace in interface IgniteInternalCache<K,V>replace 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> replaceAsync(K key, V val)
This method will return true if value is stored in cache and false otherwise.
Unlike IgniteInternalCache.getAndReplaceAsync(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.
replaceAsync in interface IgniteInternalCache<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 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.
replace in interface IgniteInternalCache<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.
replaceAsync in interface IgniteInternalCache<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 void putAll(Map<? extends K,? extends V> m) throws IgniteCheckedException
If write-through is enabled, the stored values will be persisted to CacheStore
via CacheStore#putAll(Transaction, Map) method.
putAll in interface IgniteInternalCache<K,V>putAll in class GridCacheAdapter<K,V>m - Key-value pairs to store in cache.IgniteCheckedException - If put operation failed.public IgniteInternalFuture<?> putAllAsync(Map<? extends K,? extends V> m)
If write-through is enabled, the stored values will be persisted to CacheStore
via CacheStore#putAll(Transaction, Map) method.
putAllAsync in interface IgniteInternalCache<K,V>putAllAsync in class GridCacheAdapter<K,V>m - Key-value pairs to store in cache.public void putAllConflict(Map<KeyCacheObject,GridCacheDrInfo> conflictMap) throws IgniteCheckedException
putAllConflict in interface IgniteInternalCache<K,V>putAllConflict in class GridCacheAdapter<K,V>conflictMap - DR map.IgniteCheckedException - If put operation failed.public IgniteInternalFuture<?> putAllConflictAsync(Map<KeyCacheObject,GridCacheDrInfo> conflictMap)
putAllConflictAsync in interface IgniteInternalCache<K,V>putAllConflictAsync in class GridCacheAdapter<K,V>conflictMap - DR map.public V getAndRemove(K key) 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 disk-based 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 #removex(Object, org.apache.ignite.lang.IgnitePredicate[]) 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 value will be removed from CacheStore
via CacheStore#remove(Transaction, Object) method.
getAndRemove in interface IgniteInternalCache<K,V>getAndRemove in class GridCacheAdapter<K,V>key - Key whose mapping is to be removed from cache.null
if there was no value for this key.IgniteCheckedException - If remove operation failed.public IgniteInternalFuture<V> getAndRemoveAsync(K key)
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 #removex(Object, org.apache.ignite.lang.IgnitePredicate[]) 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 value will be removed from CacheStore
via CacheStore#remove(Transaction, Object) method.
getAndRemoveAsync in interface IgniteInternalCache<K,V>getAndRemoveAsync in class GridCacheAdapter<K,V>key - Key whose mapping is to be removed from cache.public void removeAll(Collection<? extends K> keys) throws IgniteCheckedException
If write-through is enabled, the values will be removed from CacheStore via IgniteDataStreamer.
removeAll in interface IgniteInternalCache<K,V>removeAll in class GridCacheAdapter<K,V>keys - Keys whose mappings are to be removed from cache.IgniteCheckedException - If remove failed.public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys)
If write-through is enabled, the values will be removed from CacheStore via IgniteDataStreamer.
removeAllAsync in interface IgniteInternalCache<K,V>removeAllAsync in class GridCacheAdapter<K,V>keys - Keys whose mappings are to be removed from cache.public boolean remove(K key) throws IgniteCheckedException
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.
remove in interface IgniteInternalCache<K,V>remove in class GridCacheAdapter<K,V>key - Key whose mapping is to be removed from cache.True if filter passed validation and entry was removed, false otherwise.
Note that if filter is not specified, this method will return true.IgniteCheckedException - If remove failed.public IgniteInternalFuture<Boolean> removeAsync(K key, @Nullable CacheEntryPredicate filter)
removeAsync in class GridCacheAdapter<K,V>key - Key to remove.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.
remove in interface IgniteInternalCache<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.
removeAsync in interface IgniteInternalCache<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 removeAllConflict(Map<KeyCacheObject,GridCacheVersion> conflictMap) throws IgniteCheckedException
removeAllConflict in interface IgniteInternalCache<K,V>removeAllConflict in class GridCacheAdapter<K,V>conflictMap - DR map.IgniteCheckedException - If remove failed.public IgniteInternalFuture<?> removeAllConflictAsync(Map<KeyCacheObject,GridCacheVersion> conflictMap)
removeAllConflictAsync in interface IgniteInternalCache<K,V>removeAllConflictAsync in class GridCacheAdapter<K,V>conflictMap - DR map.protected <T> IgniteInternalFuture<T> asyncOp(CO<IgniteInternalFuture<T>> op)
op - Operation closure.protected IgniteInternalFuture<Boolean> lockAllAsync(Collection<KeyCacheObject> keys, long timeout, @Nullable IgniteTxLocalEx tx, boolean isInvalidate, boolean isRead, boolean retval, @Nullable TransactionIsolation isolation, long accessTtl)
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.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)
invokeAsync in interface IgniteInternalCache<K,V>invokeAsync in class GridCacheAdapter<K,V>key - Key.entryProcessor - Entry processor.args - Arguments.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 boolean isFastMap(CacheEntryPredicate[] filters, GridCacheOperation op)
filters - Filters.op - Operation.True if fast-map.public void updateAllAsyncInternal(UUID nodeId, GridNearAtomicUpdateRequest req, CI2<GridNearAtomicUpdateRequest,GridNearAtomicUpdateResponse> completionCb)
nodeId - Node ID.req - Update request.completionCb - Completion callback.public void updateAllAsyncInternal0(UUID nodeId, GridNearAtomicUpdateRequest req, CI2<GridNearAtomicUpdateRequest,GridNearAtomicUpdateResponse> completionCb)
nodeId - Node ID.req - Update request.completionCb - Completion callback.public String toString()
toString in class GridDhtCacheAdapter<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.6.0 Release Date : May 18 2016