Class GridNearAtomicCache<K,V>
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheAdapter<K,V>
-
- org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheAdapter<K,V>
-
- org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter<K,V>
-
- org.apache.ignite.internal.processors.cache.distributed.near.GridNearAtomicCache<K,V>
-
- All Implemented Interfaces:
Externalizable,Serializable,Iterable<javax.cache.Cache.Entry<K,V>>,IgniteInternalCache<K,V>
public class GridNearAtomicCache<K,V> extends GridNearCacheAdapter<K,V>
Near cache for atomic cache.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheAdapter
GridDistributedCacheAdapter.GlobalRemoveAllJob<K,V>
-
Nested classes/interfaces inherited from class org.apache.ignite.internal.processors.cache.GridCacheAdapter
GridCacheAdapter.AsyncOp<T>, GridCacheAdapter.AtomicReadRepairEntryProcessor<K,V>, GridCacheAdapter.BulkOperation, GridCacheAdapter.CacheExpiryPolicy, GridCacheAdapter.FutureHolder, GridCacheAdapter.InvokeAllTimeStatClosure<T>, GridCacheAdapter.PeekModes, GridCacheAdapter.TopologyVersionAwareJob, GridCacheAdapter.UpdateGetAllTimeStatClosure<T>, GridCacheAdapter.UpdateGetAndRemoveTimeStatClosure<T>, GridCacheAdapter.UpdateGetTimeStatClosure<T>, GridCacheAdapter.UpdatePutAllConflictTimeStatClosure<T>, GridCacheAdapter.UpdatePutAllTimeStatClosure<T>, GridCacheAdapter.UpdatePutAndGetTimeStatClosure<T>, GridCacheAdapter.UpdatePutTimeStatClosure<T>, GridCacheAdapter.UpdateRemoveAllConflictTimeStatClosure<T>, GridCacheAdapter.UpdateRemoveAllTimeStatClosure<T>, GridCacheAdapter.UpdateRemoveTimeStatClosure, GridCacheAdapter.UpdateTimeStatClosure<T>
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheAdapter
cacheCfg, CLEAR_ALL_SPLIT_THRESHOLD, ctx, DFLT_CACHE_RETRIES_COUNT, DFLT_CACHE_START_SIZE, DFLT_START_CACHE_SIZE, lastFut, locNodeId, log, map, MAX_RETRIES, metrics, NON_TRANSACTIONAL_IGNITE_CACHE_CLEAR_IN_TX_ERROR_MESSAGE, RET2NULL, txLockMsgLog
-
-
Constructor Summary
Constructors Constructor Description GridNearAtomicCache()Empty constructor required forExternalizable.GridNearAtomicCache(GridCacheContext<K,V> ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GridDhtCacheAdapter<K,V>dht()voiddht(GridDhtAtomicCache<K,V> dht)protected IgniteInternalFuture<Map<K,V>>getAllAsync(@Nullable Collection<? extends K> keys, boolean forcePrimary, boolean skipTx, String taskName, boolean deserializeBinary, boolean recovery, ReadRepairStrategy readRepairStrategy, boolean skipVals, boolean needVer)VgetAndPut(K key, V val, @Nullable CacheEntryPredicate filter)IgniteInternalFuture<V>getAndPutAsync0(K key, V val, @Nullable CacheEntryPredicate filter)VgetAndRemove(K key)Removes given key mapping from cache.IgniteInternalFuture<V>getAndRemoveAsync(K key)Asynchronously removes given key mapping from cache.<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)protected IgniteInternalFuture<Boolean>lockAllAsync(Collection<KeyCacheObject> keys, long timeout, @Nullable IgniteTxLocalEx tx, boolean isInvalidate, boolean isRead, boolean retval, @Nullable TransactionIsolation isolation, long createTtl, long accessTtl)voidonDeferredDelete(GridCacheEntryEx entry, GridCacheVersion ver)voidonKernalStart()Kernal start callback.@Nullable List<KeyCacheObject>processDhtAtomicUpdateRequest(UUID nodeId, GridDhtAtomicAbstractUpdateRequest req, GridDhtAtomicNearResponse res)voidprocessNearAtomicUpdateResponse(GridNearAtomicAbstractUpdateRequest req, GridNearAtomicUpdateResponse res)booleanput(K key, V val, CacheEntryPredicate filter)voidputAll(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.voidputAllConflict(Map<KeyCacheObject,GridCacheDrInfo> drMap)Store DR data.IgniteInternalFuture<?>putAllConflictAsync(Map<KeyCacheObject,GridCacheDrInfo> drMap)Store DR data asynchronously.IgniteInternalFuture<Boolean>putAsync0(K key, V val, @Nullable CacheEntryPredicate filter)booleanremove(K key)Removes given key mapping from cache.booleanremove(K key, @Nullable CacheEntryPredicate filter)voidremoveAll()Removes mappings from cache.voidremoveAll(Collection<? extends K> keys)Removes given key mappings from cache.IgniteInternalFuture<?>removeAllAsync()IgniteInternalFuture<?>removeAllAsync(Collection<? extends K> keys)Asynchronously removes given key mappings from cache for entries.voidremoveAllConflict(Map<KeyCacheObject,GridCacheVersion> drMap)Removes DR data.IgniteInternalFuture<?>removeAllConflictAsync(Map<KeyCacheObject,GridCacheVersion> drMap)Removes DR data asynchronously.IgniteInternalFuture<Boolean>removeAsync(K key, @Nullable CacheEntryPredicate filter)voidunlockAll(@Nullable Collection<? extends K> keys)Unlocks given keys only if current thread owns the locks.-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter
clearLocally, clearLocallyAll, entryEx, entryExx, entrySet, evict, evictAll, isAllLockedNearOnly, isLocked, isLockedNearOnly, isNear, loadAsync, localLoad, localLoadCache, localLoadCacheAsync, nearEntries, nearSize, offHeapAllocatedSize, offHeapEntriesCount, onReconnected, peekExx, preloader, primarySize, primarySizeLong, processGetResponse, size, sizeLong, splitClearLocally, start, toString
-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheAdapter
localSizeLong, localSizeLong, lockAllAsync, removeVersionedEntry, txLockAsync
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheAdapter
active, active, affinity, allEntries, asyncOp, asyncOpAcquire, asyncOpRelease, cache, checkJta, clear, clear, clearAll, clearAllAsync, clearAsync, clearAsync, clearLocally, clearLocally, clusterMetrics, clusterMetrics, configuration, containsKey, containsKeyAsync, containsKeys, containsKeysAsync, context, decrementSize, entries, entryEx, entryEx, entrySet, expiry, expiryPolicy, get, get, getAll, getAll, getAllAsync, getAllOutTx, getAllOutTxAsync, getAndPut, getAndPut0, getAndPutAsync, getAndPutAsync, getAndPutIfAbsent, getAndPutIfAbsentAsync, getAndRemove0, getAndRemoveAsync0, getAndReplace, getAndReplaceAsync, getAsync, getAsync, getEntries, getEntriesAsync, getEntry, getEntryAsync, getForcePrimary, getForcePrimaryAsync, igniteIterator, igniteIterator, incrementSize, init, invoke, isColocated, isDht, isDhtAtomic, isEmpty, isLocal, isLockedByThread, iterator, iterator, keepBinary, keySet, lastAsyncFuture, loadAll, localEntries, localMetrics, localPeek, localPreloadPartition, localSize, lock, lockAll, lockAsync, log, lostPartitions, map, metrics0, name, nextVersion, nextVersion, onKernalStop, onUndeploy, parsePeekModes, peekEx, peekEx, preloadPartition, preloadPartitionAsync, printMemoryStats, put, put0, putAll0, putAllAsync0, putAsync, putAsync, putIfAbsent, putIfAbsentAsync, readExternal, readResolve, rebalance, remove, remove0, removeAll0, removeAllAsync0, removeAsync, removeAsync, removeAsync0, removeEntry, removeIfObsolete, removeMetrics, repairableGet, repairableGetAll, repairableGetAllAsync, repairableGetAsync, replace, replace, replaceAsync, replaceAsync, scanIterator, setSkipStore, size, sizeAsync, sizeLong, sizeLong, sizeLongAsync, sizeLongAsync, skipStore, startInfo, stop, stopInfo, tx, txStart, txStart, txStartEx, unlock, warnIfUnordered, warnIfUnordered, withExpiryPolicy, withNoRetries, writeExternal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
GridNearAtomicCache
public GridNearAtomicCache()
Empty constructor required forExternalizable.
-
GridNearAtomicCache
public GridNearAtomicCache(GridCacheContext<K,V> ctx)
- Parameters:
ctx- Context.
-
-
Method Detail
-
onKernalStart
public void onKernalStart() throws IgniteCheckedExceptionKernal start callback.- Overrides:
onKernalStartin classGridCacheAdapter<K,V>- Throws:
IgniteCheckedException- If callback failed.
-
dht
public void dht(GridDhtAtomicCache<K,V> dht)
- Parameters:
dht- DHT cache.
-
dht
public GridDhtCacheAdapter<K,V> dht()
- Specified by:
dhtin classGridNearCacheAdapter<K,V>- Returns:
- DHT cache.
-
processNearAtomicUpdateResponse
public void processNearAtomicUpdateResponse(GridNearAtomicAbstractUpdateRequest req, GridNearAtomicUpdateResponse res)
- Parameters:
req- Update request.res- Update response.
-
processDhtAtomicUpdateRequest
@Nullable public @Nullable List<KeyCacheObject> processDhtAtomicUpdateRequest(UUID nodeId, GridDhtAtomicAbstractUpdateRequest req, GridDhtAtomicNearResponse res)
- Parameters:
nodeId- Sender node ID.req- Dht atomic update request.res- Dht atomic update response.- Returns:
- Evicted near keys (if any).
-
getAllAsync
protected IgniteInternalFuture<Map<K,V>> getAllAsync(@Nullable @Nullable Collection<? extends K> keys, boolean forcePrimary, boolean skipTx, String taskName, boolean deserializeBinary, boolean recovery, ReadRepairStrategy readRepairStrategy, boolean skipVals, boolean needVer)
- Specified by:
getAllAsyncin classGridCacheAdapter<K,V>- Parameters:
keys- Keys.forcePrimary- Force primary.skipTx- Skip tx.taskName- Task name.deserializeBinary- Deserialize binary.recovery- Recovery mode flag.skipVals- Skip values.needVer- Need version.- Returns:
- Future for the get operation.
- See Also:
GridCacheAdapter.getAllAsync(Collection)
-
getAndPut
public V getAndPut(K key, V val, @Nullable @Nullable CacheEntryPredicate filter) throws IgniteCheckedException
- Overrides:
getAndPutin classGridCacheAdapter<K,V>- Parameters:
key- Key.val- Value.filter- Optional filter.- Returns:
- Previous value.
- Throws:
IgniteCheckedException- If failed.
-
put
public boolean put(K key, V val, CacheEntryPredicate filter) throws IgniteCheckedException
- Overrides:
putin classGridCacheAdapter<K,V>- Parameters:
key- Key.val- Value.filter- Filter.- Returns:
Trueif optional filter passed and value was stored in cache,falseotherwise. Note that this method will returntrueif filter is not specified.- Throws:
IgniteCheckedException- If put operation failed.
-
getAndPutAsync0
public IgniteInternalFuture<V> getAndPutAsync0(K key, V val, @Nullable @Nullable CacheEntryPredicate filter)
- Overrides:
getAndPutAsync0in classGridCacheAdapter<K,V>- Parameters:
key- Key.val- Value.filter- Optional filter.- Returns:
- Put operation future.
-
putAsync0
public IgniteInternalFuture<Boolean> putAsync0(K key, V val, @Nullable @Nullable CacheEntryPredicate filter)
- Overrides:
putAsync0in classGridCacheAdapter<K,V>- Parameters:
key- Key.val- Value.filter- Optional filter.- Returns:
- Putx operation future.
-
putAll
public void putAll(Map<? extends K,? extends V> m) throws IgniteCheckedException
Stores given key-value pairs in cache. If filters are provided, then entries will be stored in cache only if they pass the filter. Note that filter check is atomic, so value stored in cache is guaranteed to be consistent with the filters.If write-through is enabled, the stored values will be persisted to
CacheStoreviaCacheStore#putAll(Transaction, Map)method.Transactions
This method is transactional and will enlist the entry into ongoing transaction if there is one.- Specified by:
putAllin interfaceIgniteInternalCache<K,V>- Overrides:
putAllin classGridCacheAdapter<K,V>- Parameters:
m- Key-value pairs to store in cache.- Throws:
IgniteCheckedException- If put operation failed.
-
putAllAsync
public IgniteInternalFuture<?> putAllAsync(Map<? extends K,? extends V> m)
Asynchronously stores given key-value pairs in cache. If filters are provided, then entries will be stored in cache only if they pass the filter. Note that filter check is atomic, so value stored in cache is guaranteed to be consistent with the filters.If write-through is enabled, the stored values will be persisted to
CacheStoreviaCacheStore#putAll(Transaction, Map)method.Transactions
This method is transactional and will enlist the entry into ongoing transaction if there is one.- Specified by:
putAllAsyncin interfaceIgniteInternalCache<K,V>- Overrides:
putAllAsyncin classGridCacheAdapter<K,V>- Parameters:
m- Key-value pairs to store in cache.- Returns:
- Future for putAll operation.
-
putAllConflict
public void putAllConflict(Map<KeyCacheObject,GridCacheDrInfo> drMap) throws IgniteCheckedException
Store DR data.- Specified by:
putAllConflictin interfaceIgniteInternalCache<K,V>- Overrides:
putAllConflictin classGridCacheAdapter<K,V>- Parameters:
drMap- DR map.- Throws:
IgniteCheckedException- If put operation failed.
-
putAllConflictAsync
public IgniteInternalFuture<?> putAllConflictAsync(Map<KeyCacheObject,GridCacheDrInfo> drMap) throws IgniteCheckedException
Store DR data asynchronously.- Specified by:
putAllConflictAsyncin interfaceIgniteInternalCache<K,V>- Overrides:
putAllConflictAsyncin classGridCacheAdapter<K,V>- Parameters:
drMap- DR map.- Returns:
- Future.
- Throws:
IgniteCheckedException- If put operation failed.
-
invoke
public <T> javax.cache.processor.EntryProcessorResult<T> invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args) throws IgniteCheckedException
- Specified by:
invokein interfaceIgniteInternalCache<K,V>- Overrides:
invokein classGridCacheAdapter<K,V>- Parameters:
key- Key.entryProcessor- Entry processor.args- Arguments.- Returns:
- Invoke result.
- Throws:
IgniteCheckedException- If failed.
-
invokeAll
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
- Specified by:
invokeAllin interfaceIgniteInternalCache<K,V>- Overrides:
invokeAllin classGridCacheAdapter<K,V>- Parameters:
keys- Keys.entryProcessor- Entry processor.args- Arguments.- Returns:
- Invoke results.
- Throws:
IgniteCheckedException- If failed.
-
invokeAllAsync
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)
- Specified by:
invokeAllAsyncin interfaceIgniteInternalCache<K,V>- Overrides:
invokeAllAsyncin classGridCacheAdapter<K,V>- Parameters:
map- Map containing keys and entry processors to be applied to values.args- Arguments.- Returns:
- Future.
-
invokeAsync
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
- Specified by:
invokeAsyncin interfaceIgniteInternalCache<K,V>- Overrides:
invokeAsyncin classGridCacheAdapter<K,V>- Parameters:
key- Key.entryProcessor- Entry processor.args- Arguments.- Returns:
- Future.
- Throws:
javax.cache.processor.EntryProcessorException
-
invokeAll
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
- Specified by:
invokeAllin interfaceIgniteInternalCache<K,V>- Overrides:
invokeAllin classGridCacheAdapter<K,V>- Parameters:
map- Map containing keys and entry processors to be applied to values.args- Arguments.- Returns:
- Invoke results.
- Throws:
IgniteCheckedException- If failed.
-
invokeAllAsync
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)
- Specified by:
invokeAllAsyncin interfaceIgniteInternalCache<K,V>- Overrides:
invokeAllAsyncin classGridCacheAdapter<K,V>- Parameters:
keys- Keys.entryProcessor- Entry processor.args- Arguments.- Returns:
- Future.
-
remove
public boolean remove(K key, @Nullable @Nullable CacheEntryPredicate filter) throws IgniteCheckedException
- Overrides:
removein classGridCacheAdapter<K,V>- Parameters:
key- Key.filter- Filter.- Returns:
Trueif entry was removed.- Throws:
IgniteCheckedException- If failed.
-
getAndRemove
public V getAndRemove(K key) throws IgniteCheckedException
Removes given key mapping from cache. If cache previously contained value for the given key, then this value is returned. In case ofCacheMode.PARTITIONEDorCacheMode.REPLICATEDcaches, 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
CacheStoreviaCacheStore#remove(Transaction, Object)method.Transactions
This method is transactional and will enlist the entry into ongoing transaction if there is one.- Specified by:
getAndRemovein interfaceIgniteInternalCache<K,V>- Overrides:
getAndRemovein classGridCacheAdapter<K,V>- Parameters:
key- Key whose mapping is to be removed from cache.- Returns:
- Previous value associated with specified key, or
nullif there was no value for this key. - Throws:
IgniteCheckedException- If remove operation failed.
-
getAndRemoveAsync
public IgniteInternalFuture<V> getAndRemoveAsync(K key)
Asynchronously removes given key mapping from cache. If cache previously contained value for the given key, then this value is returned. In case ofCacheMode.PARTITIONEDorCacheMode.REPLICATEDcaches, 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
CacheStoreviaCacheStore#remove(Transaction, Object)method.Transactions
This method is transactional and will enlist the entry into ongoing transaction if there is one.- Specified by:
getAndRemoveAsyncin interfaceIgniteInternalCache<K,V>- Overrides:
getAndRemoveAsyncin classGridCacheAdapter<K,V>- Parameters:
key- Key whose mapping is to be removed from cache.- Returns:
- Future for the remove operation.
-
removeAll
public void removeAll(Collection<? extends K> keys) throws IgniteCheckedException
Removes given key mappings from cache.If write-through is enabled, the values will be removed from
CacheStoreviaIgniteDataStreamer.Transactions
This method is transactional and will enlist the entry into ongoing transaction if there is one.- Specified by:
removeAllin interfaceIgniteInternalCache<K,V>- Overrides:
removeAllin classGridCacheAdapter<K,V>- Parameters:
keys- Keys whose mappings are to be removed from cache.- Throws:
IgniteCheckedException- If remove failed.
-
removeAllAsync
public IgniteInternalFuture<?> removeAllAsync(Collection<? extends K> keys)
Asynchronously removes given key mappings from cache for entries.If write-through is enabled, the values will be removed from
CacheStoreviaIgniteDataStreamer.Transactions
This method is transactional and will enlist the entry into ongoing transaction if there is one.- Specified by:
removeAllAsyncin interfaceIgniteInternalCache<K,V>- Overrides:
removeAllAsyncin classGridCacheAdapter<K,V>- Parameters:
keys- Keys whose mappings are to be removed from cache.- Returns:
- Future for the remove operation. The future will complete whenever remove operation completes.
-
remove
public boolean remove(K key) throws IgniteCheckedException
Removes given key mapping from cache.This method will return
trueif remove did occur, which means that all optionally provided filters have passed and there was something to remove,falseotherwise.If write-through is enabled, the value will be removed from
CacheStoreviaCacheStore#remove(Transaction, Object)method.Transactions
This method is transactional and will enlist the entry into ongoing transaction if there is one.- Specified by:
removein interfaceIgniteInternalCache<K,V>- Overrides:
removein classGridCacheAdapter<K,V>- Parameters:
key- Key whose mapping is to be removed from cache.- Returns:
Trueif filter passed validation and entry was removed,falseotherwise. Note that if filter is not specified, this method will returntrue.- Throws:
IgniteCheckedException- If remove failed.
-
removeAsync
public IgniteInternalFuture<Boolean> removeAsync(K key, @Nullable @Nullable CacheEntryPredicate filter)
- Overrides:
removeAsyncin classGridCacheAdapter<K,V>- Parameters:
key- Key to remove.filter- Optional filter.- Returns:
- Putx operation future.
-
removeAll
public void removeAll() throws IgniteCheckedExceptionRemoves mappings from cache.USE WITH CARE - if your cache has many entries then transaction will quickly become very heavy and slow.
If write-through is enabled, the values will be removed from
CacheStoreviaIgniteDataStreamer.Transactions
This method is not transactional.- Specified by:
removeAllin interfaceIgniteInternalCache<K,V>- Overrides:
removeAllin classGridDistributedCacheAdapter<K,V>- Throws:
IgniteCheckedException- If remove failed.
-
removeAllAsync
public IgniteInternalFuture<?> removeAllAsync()
- Specified by:
removeAllAsyncin interfaceIgniteInternalCache<K,V>- Overrides:
removeAllAsyncin classGridDistributedCacheAdapter<K,V>- Returns:
- Remove future.
-
removeAllConflict
public void removeAllConflict(Map<KeyCacheObject,GridCacheVersion> drMap) throws IgniteCheckedException
Removes DR data.- Specified by:
removeAllConflictin interfaceIgniteInternalCache<K,V>- Overrides:
removeAllConflictin classGridCacheAdapter<K,V>- Parameters:
drMap- DR map.- Throws:
IgniteCheckedException- If remove failed.
-
removeAllConflictAsync
public IgniteInternalFuture<?> removeAllConflictAsync(Map<KeyCacheObject,GridCacheVersion> drMap) throws IgniteCheckedException
Removes DR data asynchronously.- Specified by:
removeAllConflictAsyncin interfaceIgniteInternalCache<K,V>- Overrides:
removeAllConflictAsyncin classGridCacheAdapter<K,V>- Parameters:
drMap- DR map.- Returns:
- Future.
- Throws:
IgniteCheckedException- If remove failed.
-
lockAllAsync
protected IgniteInternalFuture<Boolean> lockAllAsync(Collection<KeyCacheObject> keys, long timeout, @Nullable @Nullable IgniteTxLocalEx tx, boolean isInvalidate, boolean isRead, boolean retval, @Nullable @Nullable TransactionIsolation isolation, long createTtl, long accessTtl)
- Specified by:
lockAllAsyncin classGridDistributedCacheAdapter<K,V>- Parameters:
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.createTtl- TTL for create operation.accessTtl- TTL for read operation.- Returns:
- Future for locks.
-
unlockAll
public void unlockAll(@Nullable @Nullable Collection<? extends K> keys) throws IgniteCheckedExceptionUnlocks given keys only if current thread owns the locks. Only the keys that have been locked by calling thread and pass through the filter (if any) will be unlocked. If none of the key locks is owned by current thread, then this method will do nothing.Transactions
Locks are not transactional and should not be used from within transactions. If you do need explicit locking within transaction, then you should useTransactionConcurrency.PESSIMISTICconcurrency control for transaction which will acquire explicit locks for relevant cache operations.- Parameters:
keys- Keys to unlock.- Throws:
IgniteCheckedException- If unlock execution resulted in error.
-
onDeferredDelete
public void onDeferredDelete(GridCacheEntryEx entry, GridCacheVersion ver)
- Specified by:
onDeferredDeletein classGridCacheAdapter<K,V>- Parameters:
entry- Entry.ver- Version.
-
-