public class GridDhtColocatedCache<K,V> extends GridDhtTransactionalCacheAdapter<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>preldr| 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 |
|---|---|
protected GridCacheEntryEx |
entryExSafe(KeyCacheObject key,
AffinityTopologyVersion topVer) |
GridDistributedCacheEntry |
entryExx(KeyCacheObject key,
AffinityTopologyVersion topVer,
boolean allowDetached)
Gets or creates entry for given key and given topology version.
|
IgniteInternalFuture<Map<K,V>> |
getAllAsync(Collection<? extends K> keys,
boolean forcePrimary,
boolean skipTx,
GridCacheEntryEx entry,
UUID subjId,
String taskName,
boolean deserializePortable,
boolean skipVals)
This method is used internally.
|
protected void |
init()
Post constructor initialization for subclasses.
|
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(Collection<KeyCacheObject> keys,
boolean readThrough,
boolean reload,
boolean forcePrimary,
AffinityTopologyVersion topVer,
UUID subjId,
String taskName,
boolean deserializePortable,
IgniteCacheExpiryPolicy expiryPlc,
boolean skipVals) |
IgniteInternalFuture<Boolean> |
lockAllAsync(Collection<KeyCacheObject> keys,
long timeout,
IgniteTxLocalEx tx,
boolean isInvalidate,
boolean isRead,
boolean retval,
TransactionIsolation isolation,
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.
|
lockAllAsync, lockAllAsyncInternal, processDhtLockRequest, processDhtLockRequest0, processDhtUnlockRequest, removeLocksbeginMultiUpdate, createEntry, dhtPreloader, endMultiUpdate, entryEx, entryEx, entryExx, entryExx, entryExx, entrySet, getDhtAsync, localEntriesIterator, localLoad, localLoadCache, multiUpdateFinishFuture, multiUpdateTopologyFuture, needRemap, onDeferredDelete, onKernalStart, onKernalStop, peekExx, preloader, primarySize, printMemoryStats, processNearGetRequest, sendTtlUpdateRequest, splitClearLocally, stop, topologylockAllAsync, removeAll, removeAllAsync, removeVersionedEntry, txLockAsyncaffinity, 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, entrySet, entrySet, entrySetx, evict, evictAll, expiry, expiryPolicy, forSubjectId, get, get, getAll, getAll, getAllAsync, getAllAsync, getAllAsync, getAllAsync0, getAllOutTx, getAllOutTxAsync, getAndPut, getAndPut, getAndPutAsync, getAndPutAsync, getAndPutAsync0, getAndPutIfAbsent, getAndPutIfAbsentAsync, getAndRemove, getAndRemoveAsync, getAndReplace, getAndReplaceAsync, getAsync, getAsync, getForcePrimary, getForcePrimaryAsync, igfsDataSpaceMax, igfsDataSpaceUsed, igniteIterator, invoke, invokeAll, invokeAll, invokeAllAsync, invokeAllAsync, invokeAsync, isDht, isDhtAtomic, isEmpty, isIgfsDataCache, isLocal, isMongoDataCache, isMongoMetaCache, isNear, iterator, iterator, keepPortable, keySet, keySet, keySetx, keySetx, loadAll, localEntries, localLoadCacheAsync, localPeek, localRemoveAll, localSize, lock, lockAll, lockAsync, log, map, metrics, metrics0, mxBean, name, nearSize, offHeapAllocatedSize, offHeapEntriesCount, onIgfsDataSizeChanged, onUndeploy, overflowSize, peekEx, peekEx, primaryEntrySet, primaryKeySet, primaryKeySet, 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, startInfo, stopInfo, swapKeys, swapSize, tryPutIfAbsent, tx, txStart, txStart, txStartEx, unlock, validateCacheKey, validateCacheKeys, values, values, withExpiryPolicy, writeExternalpublic 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.protected void init()
init in class GridDhtCacheAdapter<K,V>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.public IgniteInternalFuture<Map<K,V>> getAllAsync(@Nullable Collection<? extends K> keys, boolean forcePrimary, boolean skipTx, @Nullable GridCacheEntryEx entry, @Nullable UUID subjId, String taskName, boolean deserializePortable, boolean skipVals)
GridDhtCacheAdapter.getDhtAsync(UUID, long, LinkedHashMap, boolean, boolean, AffinityTopologyVersion, UUID, int, IgniteCacheExpiryPolicy, boolean)
method instead to retrieve DHT value.getAllAsync in class GridDhtCacheAdapter<K,V>keys - Keys.forcePrimary - Force primary.skipTx - Skip tx.entry - Entry.subjId - Subj Id.taskName - Task name.deserializePortable - Deserialize portable.skipVals - Skip values.GridCacheAdapter.getAllAsync(Collection)protected GridCacheEntryEx entryExSafe(KeyCacheObject key, AffinityTopologyVersion topVer)
entryExSafe in class GridCacheAdapter<K,V>key - Key.topVer - Topology version.public IgniteInternalFuture<Map<K,V>> loadAsync(@Nullable Collection<KeyCacheObject> keys, boolean readThrough, boolean reload, boolean forcePrimary, AffinityTopologyVersion topVer, @Nullable UUID subjId, String taskName, boolean deserializePortable, @Nullable IgniteCacheExpiryPolicy expiryPlc, boolean skipVals)
keys - Keys to load.readThrough - Read through flag.reload - Reload flag.forcePrimary - Force get from primary node flag.topVer - Topology version.subjId - Subject ID.taskName - Task name.deserializePortable - Deserialize portable flag.expiryPlc - Expiry policy.skipVals - Skip values flag.public IgniteInternalFuture<Boolean> lockAllAsync(Collection<KeyCacheObject> keys, long timeout, @Nullable IgniteTxLocalEx tx, boolean isInvalidate, boolean isRead, boolean retval, @Nullable TransactionIsolation isolation, 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.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 Fabric : ver. 1.2.0-incubating Release Date : June 16 2015