public class GridDhtColocatedCache<K,V> extends GridDhtTransactionalCacheAdapter<K,V>
GridDhtCacheAdapter.MessageHandler<M>GridCacheAdapter.AsyncOp<T>, GridCacheAdapter.CacheExpiryPolicy, GridCacheAdapter.FutureHolder, GridCacheAdapter.InvokeAllTimeStatClosure<T>, 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| Constructor and Description |
|---|
GridDhtColocatedCache()
Empty constructor required for
Externalizable |
GridDhtColocatedCache(GridCacheContext<K,V> ctx) |
GridDhtColocatedCache(GridCacheContext<K,V> ctx,
GridCacheConcurrentMap map)
Creates colocated cache with specified map.
|
| Modifier and Type | Method and Description |
|---|---|
GridDistributedCacheEntry |
entryExx(KeyCacheObject key,
AffinityTopologyVersion topVer,
boolean allowDetached)
Gets or creates entry for given key and given topology version.
|
IgniteInternalFuture<Map<K,V>> |
getAllAsync(@Nullable Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
@Nullable UUID subjId,
String taskName,
boolean deserializeBinary,
boolean recovery,
boolean readRepair,
boolean skipVals,
boolean needVer) |
protected IgniteInternalFuture<V> |
getAsync(K key,
boolean forcePrimary,
boolean skipTx,
@Nullable UUID subjId,
String taskName,
boolean deserializeBinary,
boolean skipVals,
boolean needVer) |
boolean |
isColocated() |
boolean |
isLocked(K key)
Checks if any node owns a lock for this key.
|
boolean |
isLockedByThread(K key)
Checks if current thread owns a lock on this key.
|
IgniteInternalFuture<Map<K,V>> |
loadAsync(@Nullable Collection<KeyCacheObject> keys,
boolean readThrough,
boolean forcePrimary,
AffinityTopologyVersion topVer,
@Nullable UUID subjId,
String taskName,
boolean deserializeBinary,
boolean recovery,
@Nullable IgniteCacheExpiryPolicy expiryPlc,
boolean skipVals,
boolean needVer,
boolean keepCacheObj,
@Nullable String txLbl,
@Nullable MvccSnapshot mvccSnapshot) |
IgniteInternalFuture<Object> |
loadAsync(KeyCacheObject key,
boolean readThrough,
boolean forcePrimary,
AffinityTopologyVersion topVer,
@Nullable UUID subjId,
String taskName,
boolean deserializeBinary,
@Nullable IgniteCacheExpiryPolicy expiryPlc,
boolean skipVals,
boolean needVer,
boolean keepCacheObj,
boolean recovery,
@Nullable MvccSnapshot mvccSnapshot,
@Nullable String txLbl) |
IgniteInternalFuture<Boolean> |
lockAllAsync(Collection<KeyCacheObject> keys,
long timeout,
@Nullable IgniteTxLocalEx tx,
boolean isInvalidate,
boolean isRead,
boolean retval,
@Nullable TransactionIsolation isolation,
long createTtl,
long accessTtl)
This is an entry point to pessimistic locking within transaction.
|
GridNearTransactionalCache<K,V> |
near() |
void |
removeLocks(long threadId,
GridCacheVersion ver,
Collection<KeyCacheObject> keys)
Removes locks regardless of whether they are owned or not for given
version and keys.
|
void |
start()
Starts this cache.
|
String |
toString() |
void |
unlockAll(Collection<? extends K> keys)
Unlocks given keys only if current thread owns the locks.
|
initTxTopologyVersion, lockAllAsync, lockAllAsyncInternal, removeLocksaddFuture, beginMultiUpdate, createEntry, dumpDebugInfo, endMultiUpdate, entryEx, entryExx, entryExx, getDhtAsync, localEntriesIterator, localLoad, localLoadCache, multiUpdateFinishFuture, multiUpdateTopologyFuture, needRemap, onDeferredDelete, onKernalStop, peekExx, preloader, primarySize, primarySizeLong, printMemoryStats, processForceKeyResponse, processForceKeysRequest, processNearGetRequest, processNearGetResponse, processNearSingleGetRequest, processNearSingleGetResponse, removeFuture, sendTtlUpdateRequest, size, sizeLong, splitClearLocally, topologylocalSizeLong, localSizeLong, lockAllAsync, removeAll, removeAllAsync, removeVersionedEntry, txLockAsyncactive, active, affinity, allEntries, asyncOp, asyncOpAcquire, asyncOpRelease, awaitLastFut, cache, checkCurrentTx, checkJta, clear, clear, clearAll, clearAllAsync, clearAsync, clearAsync, clearLocally, clearLocally, clearLocally, clearLocallyAll, clusterMetrics, clusterMetrics, clusterMxBean, configuration, containsKey, containsKeyAsync, containsKeys, containsKeysAsync, context, decrementSize, entries, entryEx, entryEx, entrySet, entrySet, evict, evictAll, expiry, expiryPolicy, forceKeyCheck, forSubjectId, get, get, getAll, getAll, getAllAsync, getAllAsync, getAllAsync0, getAllOutTx, getAllOutTxAsync, getAndPut, getAndPut, getAndPut0, getAndPutAsync, getAndPutAsync, getAndPutAsync0, getAndPutIfAbsent, getAndPutIfAbsentAsync, getAndRemove, getAndRemove0, getAndRemoveAsync, getAndRemoveAsync0, getAndReplace, getAndReplaceAsync, getAsync, getEntries, getEntriesAsync, getEntry, getEntryAsync, getForcePrimary, getForcePrimaryAsync, igfsDataSpaceUsed, igniteIterator, igniteIterator, incrementSize, init, invoke, invoke, invokeAll, invokeAll, invokeAllAsync, invokeAllAsync, invokeAsync, isDht, isDhtAtomic, isEmpty, isIgfsDataCache, isLocal, isNear, iterator, iterator, keepBinary, keySet, loadAll, localEntries, localLoadCacheAsync, localMetrics, localMxBean, localPeek, localPreloadPartition, localSize, lock, lockAll, lockAsync, log, lostPartitions, map, metrics0, name, nearSize, offHeapAllocatedSize, offHeapEntriesCount, onIgfsDataSizeChanged, onKernalStart, onReconnected, onUndeploy, parsePeekModes, peekEx, peekEx, preloadPartition, preloadPartitionAsync, 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, removeMetrics, repairableGet, repairableGetAll, repairableGetAllAsync, repairableGetAsync, repairAsync, repairAsync, replace, replace, replaceAsync, replaceAsync, saveFuture, scanIterator, setSkipStore, size, sizeAsync, sizeLong, sizeLong, sizeLongAsync, sizeLongAsync, skipStore, startInfo, stop, stopInfo, tx, txStart, txStart, txStartEx, unlock, validateCacheKey, validateCacheKeys, withAllowAtomicOpsInTx, withExpiryPolicy, withNoRetries, writeExternalclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic GridDhtColocatedCache()
Externalizablepublic GridDhtColocatedCache(GridCacheContext<K,V> ctx)
ctx - Cache context.public GridDhtColocatedCache(GridCacheContext<K,V> ctx, GridCacheConcurrentMap map)
ctx - Cache context.map - Cache map.public boolean isColocated()
isColocated in class GridCacheAdapter<K,V>True if cache is colocated.public void start()
throws IgniteCheckedException
start in class GridDhtTransactionalCacheAdapter<K,V>IgniteCheckedException - If start failed.public GridDistributedCacheEntry entryExx(KeyCacheObject key, AffinityTopologyVersion topVer, boolean allowDetached)
key - Key for entry.topVer - Topology version.allowDetached - Whether to allow detached entries. If true and node is not primary
for given key, a new detached entry will be created. Otherwise, entry will be obtained from
dht cache map.GridDhtInvalidPartitionException - If allowDetached is false and node is not primary
for given key.public boolean isLocked(K key)
This is a local in-VM operation and does not involve any network trips or access to persistent storage in any way.
isLocked in interface IgniteInternalCache<K,V>isLocked in class GridCacheAdapter<K,V>key - Key to check.True if lock is owned by some node.public boolean isLockedByThread(K key)
This is a local in-VM operation and does not involve any network trips or access to persistent storage in any way.
isLockedByThread in interface IgniteInternalCache<K,V>isLockedByThread in class GridCacheAdapter<K,V>key - Key to check.True if key is locked by current thread.protected IgniteInternalFuture<V> getAsync(K key, boolean forcePrimary, boolean skipTx, @Nullable @Nullable UUID subjId, String taskName, boolean deserializeBinary, boolean skipVals, 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.needVer - Need version.public IgniteInternalFuture<Map<K,V>> getAllAsync(@Nullable @Nullable Collection<? extends K> keys, boolean forcePrimary, boolean skipTx, @Nullable @Nullable UUID subjId, String taskName, boolean deserializeBinary, boolean recovery, boolean readRepair, boolean skipVals, boolean needVer)
getAllAsync in class GridDhtCacheAdapter<K,V>keys - Keys.forcePrimary - Force primary.skipTx - Skip tx.subjId - Subj Id.taskName - Task name.deserializeBinary - Deserialize binary.recovery - Recovery mode flag.skipVals - Skip values.needVer - Need version.GridCacheAdapter.getAllAsync(Collection)public final IgniteInternalFuture<Object> loadAsync(KeyCacheObject key, boolean readThrough, boolean forcePrimary, AffinityTopologyVersion topVer, @Nullable @Nullable UUID subjId, String taskName, boolean deserializeBinary, @Nullable @Nullable IgniteCacheExpiryPolicy expiryPlc, boolean skipVals, boolean needVer, boolean keepCacheObj, boolean recovery, @Nullable @Nullable MvccSnapshot mvccSnapshot, @Nullable @Nullable String txLbl)
key - Key to load.readThrough - Read through flag.forcePrimary - Force get from primary node flag.topVer - Topology version.subjId - Subject ID.taskName - Task name.deserializeBinary - Deserialize binary flag.expiryPlc - Expiry policy.skipVals - Skip values flag.needVer - If true returns values as tuples containing value and version.keepCacheObj - Keep cache objects flag.txLbl - Transaction label.public final IgniteInternalFuture<Map<K,V>> loadAsync(@Nullable @Nullable Collection<KeyCacheObject> keys, boolean readThrough, boolean forcePrimary, AffinityTopologyVersion topVer, @Nullable @Nullable UUID subjId, String taskName, boolean deserializeBinary, boolean recovery, @Nullable @Nullable IgniteCacheExpiryPolicy expiryPlc, boolean skipVals, boolean needVer, boolean keepCacheObj, @Nullable @Nullable String txLbl, @Nullable @Nullable MvccSnapshot mvccSnapshot)
keys - Keys to load.readThrough - Read through flag.forcePrimary - Force get from primary node flag.topVer - Topology version.subjId - Subject ID.taskName - Task name.deserializeBinary - Deserialize binary flag.expiryPlc - Expiry policy.skipVals - Skip values flag.needVer - If true returns values as tuples containing value and version.keepCacheObj - Keep cache objects flag.txLbl - Transaction label.mvccSnapshot - Mvcc snapshot.public 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)
lockAllAsync in class GridDhtTransactionalCacheAdapter<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.createTtl - TTL for create operation.accessTtl - TTL for read operation.public GridNearTransactionalCache<K,V> near()
near in class GridDhtTransactionalCacheAdapter<K,V>public void unlockAll(Collection<? extends K> keys)
TransactionConcurrency.PESSIMISTIC concurrency control for transaction
which will acquire explicit locks for relevant cache operations.unlockAll in interface IgniteInternalCache<K,V>unlockAll in class GridDhtCacheAdapter<K,V>keys - Keys to unlock.public void removeLocks(long threadId,
GridCacheVersion ver,
Collection<KeyCacheObject> keys)
threadId - Thread ID.ver - Lock version.keys - Keys.public String toString()
toString in class GridDhtCacheAdapter<K,V>
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.0 Release Date : February 27 2020