public class GridLocalCache<K,V> extends GridCacheAdapter<K,V>
GridCacheAdapter.AsyncOp<T>, GridCacheAdapter.FutureHolderafterPessimisticUnlock, beforePessimisticLock, cacheCfg, CLEAR_ALL_SPLIT_THRESHOLD, ctx, gridCfg, lastFut, locNodeId, log, map, metrics| Constructor and Description |
|---|
GridLocalCache()
Empty constructor required by
Externalizable. |
GridLocalCache(GridCacheContext<K,V> ctx) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
init()
Post constructor initialization for subclasses.
|
boolean |
isLocal() |
GridFuture<Boolean> |
lockAllAsync(Collection<? extends K> keys,
long timeout,
GridCacheTxLocalEx<K,V> tx,
GridPredicate<GridCacheEntry<K,V>>[] filter) |
GridFuture<Boolean> |
lockAllAsync(Collection<? extends K> keys,
long timeout,
GridPredicate<GridCacheEntry<K,V>>[] filter)
All or nothing synchronous lock for passed in keys.
|
GridCacheTxLocalAdapter<K,V> |
newTx(boolean implicit,
boolean implicitSingle,
GridCacheTxConcurrency concurrency,
GridCacheTxIsolation isolation,
long timeout,
boolean invalidate,
boolean syncCommit,
boolean syncRollback,
boolean swapOrOffheapEnabled,
boolean storeEnabled,
int txSize,
Object grpLockKey,
boolean partLock) |
void |
onDeferredDelete(GridCacheEntryEx<K,V> entry,
GridCacheVersion ver) |
GridCachePreloader<K,V> |
preloader() |
GridFuture<Boolean> |
txLockAsync(Collection<? extends K> keys,
long timeout,
GridCacheTxLocalEx<K,V> tx,
boolean isRead,
boolean retval,
GridCacheTxIsolation isolation,
boolean invalidate,
GridPredicate<GridCacheEntry<K,V>>[] filter) |
void |
unlockAll(Collection<? extends K> keys,
GridPredicate<GridCacheEntry<K,V>>[] filter)
Unlocks given keys only if current thread owns the locks.
|
affinity, afterPessimisticUnlock, afterPessimisticUnlock, allEntries, asyncOp, asyncOpAcquire, asyncOpRelease, beforePessimisticLock, beforePessimisticLock, cache, checkJta, clear, clear0, clearAll, clearAll, clearAll0, compact, compact, compactAll, compactAll, configuration, containsAllKeys, containsAllValues, containsAnyKeys, containsAnyValues, containsKey, containsKey, containsValue, containsValue, context, dataStructures, dgc, dgc, drBackupQueueSize, drListStateTransfers, drPause, drPauseState, drResume, drStateTransfer, entries, entry, entryEx, entryEx, entryEx, entryExSafe, entrySet, entrySet, entrySet, entrySet, entrySetx, evict, evict, evictAll, evictAll, evictAll, flags, flagsOff, flagsOn, forAll, forceRepartition, forEach, forSubjectId, get, get, get, getAll, getAll, getAllAsync, getAllAsync, getAllAsync, getAllAsync, getAllOutTx, getAllOutTxAsync, getAsync, getAsync, getForcePrimary, getForcePrimaryAsync, ggfsDataSpaceMax, ggfsDataSpaceUsed, globalClearAll, gridProjection, isColocated, isDht, isDhtAtomic, isDrSystemCache, isEmpty, isGgfsDataCache, isLocked, isLockedByThread, isMongoDataCache, isMongoMetaCache, isNear, iterator, keySet, keySet, loadCache, loadCacheAsync, lock, lockAll, lockAsync, log, map, metrics, metrics0, name, nearSize, offHeapAllocatedSize, offHeapEntriesCount, offHeapIterator, onGgfsDataSizeChanged, onKernalStart, onKernalStop, onUndeploy, overflowSize, peek, peek, peek, peek0, peek0, peek0, peekAll, peekAll0, peekAll0, peekEx, predicate, primaryEntrySet, primaryEntrySet, primaryKeySet, primaryKeySet, primarySize, primaryValues, primaryValues, printMemoryStats, processCheckCommittedTxRequest, processCheckCommittedTxResponse, processCheckPreparedTxRequest, processCheckPreparedTxResponse, projection, projection, projection, promote, promoteAll, put, put, putAll, putAllAsync, putAllDr, putAllDrAsync, putAsync, putAsync, putIfAbsent, putIfAbsentAsync, putx, putx, putxAsync, putxAsync, putxIfAbsent, putxIfAbsentAsync, queries, randomEntry, readExternal, readResolve, readThroughAllAsync, reload, reload, reloadAll, reloadAll, reloadAll, reloadAll, reloadAll, reloadAllAsync, reloadAllAsync, reloadAllAsync, reloadAllAsync, reloadAllAsync, reloadAsync, reloadAsync, remove, remove, remove, removeAll, removeAll, removeAllAsync, removeAllAsync, removeAllDr, removeAllDrAsync, removeAsync, removeAsync, removeAsync, removeEntry, removeIfObsolete, removex, removex, removex, removexAsync, removexAsync, removexAsync, replace, replace, replaceAsync, replaceAsync, replacex, replacex, replacexAsync, replacexAsync, resetMetrics, saveFuture, size, splitClearAll, start, startInfo, stop, stopInfo, swapIterator, swapKeys, swapSize, toMap, toString, transform, transformAll, transformAll, transformAllAsync, transformAllAsync, transformAndCompute, transformAsync, transformAsync, tx, txStart, txStart, txStart, txStartAffinity, txStartPartition, txSynchronizations, txSynchronize, txUnsynchronize, unlock, values, values, wrappers, writeExternaladdMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, readExternalMeta, removeMeta, removeMeta, replaceMeta, writeExternalMetaequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, removeMeta, removeMeta, replaceMetapublic GridLocalCache()
Externalizable.public GridLocalCache(GridCacheContext<K,V> ctx)
ctx - Cache registry.public boolean isLocal()
isLocal in class GridCacheAdapter<K,V>True if cache is local.public GridCachePreloader<K,V> preloader()
preloader in class GridCacheAdapter<K,V>protected void init()
init in class GridCacheAdapter<K,V>public GridCacheTxLocalAdapter<K,V> newTx(boolean implicit, boolean implicitSingle, GridCacheTxConcurrency concurrency, GridCacheTxIsolation isolation, long timeout, boolean invalidate, boolean syncCommit, boolean syncRollback, boolean swapOrOffheapEnabled, boolean storeEnabled, int txSize, @Nullable Object grpLockKey, boolean partLock)
newTx in class GridCacheAdapter<K,V>implicit - True if transaction is implicit.implicitSingle - Implicit-with-single-key flag.concurrency - Concurrency.isolation - Isolation.timeout - transaction timeout.invalidate - Invalidation flag.syncCommit - Synchronous commit flag.syncRollback - Synchronous rollback flag.swapOrOffheapEnabled - If true then swap storage will be used.storeEnabled - if true then read/write through will be used.txSize - Expected transaction size.grpLockKey - Group lock key if this is a group-lock transaction.partLock - True if partition is locked.public GridFuture<Boolean> txLockAsync(Collection<? extends K> keys, long timeout, GridCacheTxLocalEx<K,V> tx, boolean isRead, boolean retval, GridCacheTxIsolation isolation, boolean invalidate, GridPredicate<GridCacheEntry<K,V>>[] filter)
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.invalidate - Invalidate flag.filter - Optional filter.public GridFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout, GridPredicate<GridCacheEntry<K,V>>[] filter)
GridCacheTxConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.
GridCacheFlag.LOCAL, GridCacheFlag.READ.keys - Keys to lock.timeout - Timeout in milliseconds to wait for lock to be acquired
('0' for no expiration).filter - Optional filter that needs to atomically pass in order for the locks
to be acquired.true if all filters passed and locks were acquired before
timeout has expired, false otherwise.public GridFuture<Boolean> lockAllAsync(Collection<? extends K> keys, long timeout, @Nullable GridCacheTxLocalEx<K,V> tx, GridPredicate<GridCacheEntry<K,V>>[] filter)
keys - Keys.timeout - Timeout.tx - Transaction.filter - Filter.public void unlockAll(Collection<? extends K> keys, GridPredicate<GridCacheEntry<K,V>>[] filter) throws GridException
GridCacheTxConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.
GridCacheFlag.LOCAL, GridCacheFlag.READ.keys - Keys to unlock.filter - Optional filter which needs to pass for individual entries
to be unlocked.GridException - If unlock execution resulted in error.public void onDeferredDelete(GridCacheEntryEx<K,V> entry, GridCacheVersion ver)
onDeferredDelete in class GridCacheAdapter<K,V>entry - Entry.ver - Version.Copyright © 2014. All rights reserved.