public abstract class GridDistributedCacheAdapter<K,V> extends GridCacheAdapter<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>| Modifier | Constructor and Description |
|---|---|
protected |
GridDistributedCacheAdapter()
Empty constructor required by
Externalizable. |
protected |
GridDistributedCacheAdapter(GridCacheContext<K,V> ctx,
GridCacheConcurrentMap map) |
protected |
GridDistributedCacheAdapter(GridCacheContext<K,V> ctx,
int startSize) |
| Modifier and Type | Method and Description |
|---|---|
IgniteInternalFuture<Boolean> |
lockAllAsync(Collection<? extends K> keys,
long timeout)
All or nothing synchronous lock for passed in keys.
|
protected abstract IgniteInternalFuture<Boolean> |
lockAllAsync(Collection<KeyCacheObject> keys,
long timeout,
IgniteTxLocalEx tx,
boolean isInvalidate,
boolean isRead,
boolean retval,
TransactionIsolation isolation,
long accessTtl) |
void |
removeAll()
Removes mappings from cache for entries for which the optionally passed in filters do
pass.
|
IgniteInternalFuture<?> |
removeAllAsync() |
void |
removeVersionedEntry(KeyCacheObject key,
GridCacheVersion ver) |
String |
toString() |
IgniteInternalFuture<Boolean> |
txLockAsync(Collection<KeyCacheObject> keys,
long timeout,
IgniteTxLocalEx tx,
boolean isRead,
boolean retval,
TransactionIsolation isolation,
boolean isInvalidate,
long accessTtl) |
affinity, allEntries, asyncOp, asyncOpAcquire, asyncOpRelease, awaitLastFut, cache, checkJta, clear, clear, clearAll, clearAsync, clearAsync, clearAsync, clearLocally, clearLocally, clearLocally, clearLocally0, clearLocally0, clearLocallyAll, commitTxAsync, configuration, containsKey, containsKeyAsync, containsKeys, containsKeysAsync, context, entries, entryEx, entryEx, entryEx, entryEx, entryExSafe, entrySet, entrySet, entrySet, entrySetx, evict, evictAll, expiry, expiryPolicy, forSubjectId, get, get, getAll, getAll, getAllAsync, getAllAsync, getAllAsync, getAllAsync, getAllAsync0, getAllOutTx, getAndPut, getAndPut, getAndPutAsync, getAndPutAsync, getAndPutAsync0, getAndPutIfAbsent, getAndPutIfAbsentAsync, getAndRemove, getAndRemoveAsync, getAndReplace, getAndReplaceAsync, getAsync, getAsync, getForcePrimary, getForcePrimaryAsync, igfsDataSpaceMax, igfsDataSpaceUsed, igniteIterator, init, invoke, invokeAll, invokeAll, invokeAllAsync, invokeAllAsync, invokeAsync, isColocated, isDht, isDhtAtomic, isEmpty, isIgfsDataCache, isLocal, isLocked, isLockedByThread, isMongoDataCache, isMongoMetaCache, isNear, iterator, iterator, keepPortable, keySet, keySet, loadAll, localEntries, localLoad, localLoadCache, localLoadCacheAsync, localPeek, localRemoveAll, localSize, lock, lockAll, lockAsync, log, map, metrics, metrics0, mxBean, name, nearSize, offHeapAllocatedSize, offHeapEntriesCount, offHeapIterator, onDeferredDelete, onIgfsDataSizeChanged, onKernalStart, onKernalStop, onUndeploy, overflowSize, peekEx, peekEx, preloader, primaryEntrySet, primaryKeySet, primaryKeySet, primarySize, printMemoryStats, promote, promoteAll, put, put, putAll, putAllAsync, putAllConflict, putAllConflictAsync, putAsync, putAsync, putAsync0, putIfAbsent, putIfAbsentAsync, randomEntry, readExternal, readResolve, readThroughAllAsync, rebalance, reloadAllAsync0, remove, remove, removeAll, removeAllAsync, removeAllConflict, removeAllConflictAsync, removeAsync, removeAsync, removeAsync, removeEntry, removeIfObsolete, removex, removexAsync, replace, replace, replaceAsync, replaceAsync, replacex, replacexAsync, saveFuture, setSkipStore, size, size, sizeAsync, skipStore, splitClearLocally, start, startInfo, stop, stopInfo, swapIterator, swapKeys, swapSize, tryPutIfAbsent, tx, txStart, txStart, txStartEx, unlock, validateCacheKey, validateCacheKeys, values, values, withExpiryPolicy, writeExternalclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitunlockAllprotected GridDistributedCacheAdapter()
Externalizable.protected GridDistributedCacheAdapter(GridCacheContext<K,V> ctx, int startSize)
ctx - Cache registry.startSize - Start size.protected GridDistributedCacheAdapter(GridCacheContext<K,V> ctx, GridCacheConcurrentMap map)
ctx - Cache context.map - Cache map.public IgniteInternalFuture<Boolean> txLockAsync(Collection<KeyCacheObject> keys, long timeout, IgniteTxLocalEx tx, boolean isRead, boolean retval, TransactionIsolation isolation, boolean isInvalidate, long accessTtl)
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.isInvalidate - Invalidate flag.accessTtl - TTL for read operation.public IgniteInternalFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout)
TransactionConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.keys - Keys to lock.timeout - Timeout in milliseconds to wait for lock to be acquired
('0' for no expiration).true if all filters passed and locks were acquired before
timeout has expired, false otherwise.protected abstract IgniteInternalFuture<Boolean> lockAllAsync(Collection<KeyCacheObject> keys, long timeout, @Nullable IgniteTxLocalEx tx, boolean isInvalidate, boolean isRead, boolean retval, @Nullable TransactionIsolation isolation, long accessTtl)
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 void removeVersionedEntry(KeyCacheObject key, GridCacheVersion ver)
key - Key to remove.ver - Version to remove.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.
IgniteCheckedException - If remove failed.public IgniteInternalFuture<?> removeAllAsync()
public String toString()
toString in class GridCacheAdapter<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.1.0-incubating Release Date : May 20 2015