public abstract class GridDistributedCacheAdapter<K,V> extends GridCacheAdapter<K,V>
GridCacheAdapter.AsyncOp<T>, GridCacheAdapter.CacheExpiryPolicy, GridCacheAdapter.FutureHolder, GridCacheAdapter.PeekModes, GridCacheAdapter.TopologyVersionAwareJob, GridCacheAdapter.UpdateGetTimeStatClosure<T>, GridCacheAdapter.UpdatePutAndGetTimeStatClosure<T>, GridCacheAdapter.UpdatePutTimeStatClosure<T>, GridCacheAdapter.UpdateRemoveTimeStatClosure<T>, GridCacheAdapter.UpdateTimeStatClosure<T>
cacheCfg, CLEAR_ALL_SPLIT_THRESHOLD, ctx, DFLT_START_CACHE_SIZE, keyCheck, lastFut, locNodeId, log, map, MAX_RETRIES, metrics, RET2NULL, txLockMsgLog
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 |
---|---|
long |
localSizeLong(CachePeekMode[] peekModes) |
long |
localSizeLong(int partition,
CachePeekMode[] peekModes) |
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 createTtl,
long accessTtl) |
void |
removeAll()
Removes mappings from cache.
|
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 createTtl,
long accessTtl) |
affinity, allEntries, asyncOp, asyncOpAcquire, asyncOpRelease, awaitLastFut, cache, checkJta, clear, clear, clearAll, clearAllAsync, clearAsync, clearAsync, clearLocally, clearLocally, clearLocally, clearLocallyAll, clusterMetrics, clusterMetrics, clusterMxBean, configuration, containsKey, containsKeyAsync, containsKeys, containsKeysAsync, context, decrementSize, entries, entryEx, entryEx, entryEx, entryFactory, entrySet, entrySet, entrySet, entrySetx, evict, evictAll, expiry, expiryPolicy, forceKeyCheck, forSubjectId, get, get, get0, getAll, getAll0, getAllAsync, getAllAsync, getAllAsync, getAllAsync, getAllAsync0, getAllOutTx, getAllOutTxAsync, getAndPut, getAndPut, getAndPut0, getAndPutAsync, getAndPutAsync, getAndPutAsync0, getAndPutIfAbsent, getAndPutIfAbsentAsync, getAndRemove, getAndRemove0, getAndRemoveAsync, getAndRemoveAsync0, getAndReplace, getAndReplaceAsync, getAsync, getAsync, getAsync, getEntries, getEntriesAsync, getEntry, getEntryAsync, getForcePrimary, getForcePrimaryAsync, getTopologySafe, igfsDataSpaceUsed, igniteIterator, igniteIterator, incrementSize, init, invoke, invoke, invokeAll, invokeAll, invokeAllAsync, invokeAllAsync, invokeAsync, isColocated, isDht, isDhtAtomic, isEmpty, isIgfsDataCache, isLocal, isLocked, isLockedByThread, isMongoDataCache, isMongoMetaCache, isNear, iterator, iterator, keepBinary, keySet, keySetx, loadAll, localEntries, localLoad, localLoadCache, localLoadCacheAsync, localMetrics, localMxBean, localPeek, localSize, lock, lockAll, lockAsync, log, lostPartitions, map, metrics0, name, nearSize, offHeapAllocatedSize, offHeapEntriesCount, onDeferredDelete, onIgfsDataSizeChanged, onKernalStart, onKernalStop, onReconnected, onUndeploy, parsePeekModes, peekEx, peekEx, preloader, primaryKeySet, primarySize, primarySizeLong, printMemoryStats, put, put, put0, putAll, putAll0, putAllAsync, putAllAsync0, putAllConflict, putAllConflictAsync, putAsync, putAsync, putAsync0, putIfAbsent, putIfAbsentAsync, readExternal, readResolve, rebalance, remove, remove, remove, remove0, removeAll, removeAll0, removeAllAsync, removeAllAsync0, removeAllConflict, removeAllConflictAsync, removeAsync, removeAsync, removeAsync, removeAsync0, removeEntry, removeIfObsolete, replace, replace, replaceAsync, replaceAsync, saveFuture, scanIterator, setSkipStore, size, size, sizeAsync, sizeLong, sizeLong, sizeLong, sizeLongAsync, sizeLongAsync, skipStore, splitClearLocally, start, startInfo, stop, stopInfo, tx, txStart, txStart, txStartEx, unlock, validateCacheKey, validateCacheKeys, values, values, withExpiryPolicy, withNoRetries, writeExternal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
unlockAll
protected 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 createTtl, 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.createTtl
- TTL for create operation.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 createTtl, 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.createTtl
- TTL for create operation.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
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 CacheStore
via IgniteDataStreamer
.
removeAll
in interface IgniteInternalCache<K,V>
removeAll
in class GridCacheAdapter<K,V>
IgniteCheckedException
- If remove failed.public IgniteInternalFuture<?> removeAllAsync()
public long localSizeLong(CachePeekMode[] peekModes) throws IgniteCheckedException
peekModes
- Peek modes.IgniteCheckedException
- If failed.public long localSizeLong(int partition, CachePeekMode[] peekModes) throws IgniteCheckedException
partition
- partition.peekModes
- Peek modes.IgniteCheckedException
- If failed.public String toString()
toString
in class GridCacheAdapter<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017