public abstract class GridDhtTransactionalCacheAdapter<K,V> extends GridDhtCacheAdapter<K,V>
GridDhtCacheAdapter.GridSubjectIdAddedMessageConverter616GridCacheAdapter.AsyncOp<T>, GridCacheAdapter.FutureHolderpreldr, SUBJECT_ID_EVENTS_SINCE_VERafterPessimisticUnlock, beforePessimisticLock, cacheCfg, CLEAR_ALL_SPLIT_THRESHOLD, ctx, gridCfg, lastFut, locNodeId, log, map, metrics| Modifier | Constructor and Description |
|---|---|
protected |
GridDhtTransactionalCacheAdapter()
Empty constructor required for
Externalizable. |
protected |
GridDhtTransactionalCacheAdapter(GridCacheContext<K,V> ctx) |
protected |
GridDhtTransactionalCacheAdapter(GridCacheContext<K,V> ctx,
GridCacheConcurrentMap<K,V> map)
Constructor used for near-only cache.
|
| Modifier and Type | Method and Description |
|---|---|
GridFuture<GridCacheTx> |
commitTx(UUID nodeId,
GridNearTxFinishRequest<K,V> req) |
void |
dgc()
Runs DGC procedure on demand using
GridCacheConfiguration.getDgcSuspectLockTimeout() to identify suspect locks. |
void |
dgc(long suspectLockTimeout,
boolean global,
boolean rmvLocks)
Runs DGC procedure on demand using provided parameter to identify suspect locks.
|
protected void |
finish(GridCacheContext<K,V> ctx,
UUID nodeId,
GridCacheTxRemoteEx<K,V> tx,
GridDhtTxFinishRequest<K,V> req,
Collection<GridCacheTxEntry<K,V>> writes) |
GridFuture<Boolean> |
lockAllAsync(Collection<? extends K> keys,
long timeout,
GridCacheTxLocalEx<K,V> txx,
boolean isInvalidate,
boolean isRead,
boolean retval,
GridCacheTxIsolation isolation,
GridPredicate<GridCacheEntry<K,V>>[] filter) |
GridFuture<GridNearLockResponse<K,V>> |
lockAllAsync(GridNode nearNode,
GridNearLockRequest<K,V> req,
GridPredicate<GridCacheEntry<K,V>>[] filter0) |
GridDhtFuture<Boolean> |
lockAllAsyncInternal(Collection<? extends K> keys,
long timeout,
GridCacheTxLocalEx<K,V> txx,
boolean isInvalidate,
boolean isRead,
boolean retval,
GridCacheTxIsolation isolation,
GridPredicate<GridCacheEntry<K,V>>[] filter)
Acquires locks in partitioned cache.
|
abstract GridNearTransactionalCache<K,V> |
near() |
GridFuture<GridCacheTxEx<K,V>> |
prepareTx(GridNode nearNode,
GridNearTxPrepareRequest<K,V> req) |
protected void |
processDhtLockRequest(UUID nodeId,
GridDhtLockRequest<K,V> req) |
protected void |
processDhtLockRequest0(UUID nodeId,
GridDhtLockRequest<K,V> req) |
protected void |
processDhtTxFinishRequest(UUID nodeId,
GridDhtTxFinishRequest<K,V> req) |
protected void |
processDhtTxFinishRequest0(UUID nodeId,
GridDhtTxFinishRequest<K,V> req) |
protected void |
processDhtTxPrepareRequest(UUID nodeId,
GridDhtTxPrepareRequest<K,V> req) |
protected void |
processDhtUnlockRequest(UUID nodeId,
GridDhtUnlockRequest<K,V> req) |
void |
removeLocks(UUID nodeId,
GridCacheVersion ver,
Iterable<? extends K> keys,
boolean unmap) |
GridFuture<GridCacheTx> |
rollbackTx(UUID nodeId,
GridNearTxFinishRequest<K,V> req) |
protected void |
sendReply(UUID nodeId,
GridDhtTxFinishRequest<K,V> req)
Sends tx finish response to remote node, if response is requested.
|
void |
start()
Starts this cache.
|
beginMultiUpdate, dhtPreloader, endMultiUpdate, entry, entryEx, entryEx, entryExx, entryExx, entryExx, entrySet, getAllAsync, getDhtAsync, init, loadCache, multiUpdateFinishFuture, multiUpdateTopologyFuture, newTx, onDeferredDelete, onKernalStart, onKernalStop, peekExx, preloader, primarySize, printMemoryStats, processNearGetRequest, reload, splitClearAll, stop, topology, toString, unlockAlllockAllAsync, removeVersionedEntry, txLockAsyncaffinity, 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, drBackupQueueSize, drListStateTransfers, drPause, drPauseState, drResume, drStateTransfer, entries, entryEx, entryExSafe, entrySet, entrySet, entrySet, entrySetx, evict, evict, evictAll, evictAll, evictAll, flags, flagsOff, flagsOn, forAll, forceRepartition, forEach, forSubjectId, get, get, get, getAll, getAll, getAllAsync, getAllAsync, getAllAsync, getAllOutTx, getAllOutTxAsync, getAsync, getAsync, getForcePrimary, getForcePrimaryAsync, ggfsDataSpaceMax, ggfsDataSpaceUsed, globalClearAll, gridProjection, isColocated, isDht, isDhtAtomic, isDrSystemCache, isEmpty, isGgfsDataCache, isLocal, isLocked, isLockedByThread, isMongoDataCache, isMongoMetaCache, isNear, iterator, keySet, keySet, loadCacheAsync, lock, lockAll, lockAsync, log, map, metrics, metrics0, name, nearSize, offHeapAllocatedSize, offHeapEntriesCount, offHeapIterator, onGgfsDataSizeChanged, onUndeploy, overflowSize, peek, peek, peek, peek0, peek0, peek0, peekAll, peekAll0, peekAll0, peekEx, predicate, primaryEntrySet, primaryEntrySet, primaryKeySet, primaryKeySet, primaryValues, primaryValues, 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, 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, startInfo, stopInfo, swapIterator, swapKeys, swapSize, toMap, 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, replaceMetaprotected GridDhtTransactionalCacheAdapter()
Externalizable.protected GridDhtTransactionalCacheAdapter(GridCacheContext<K,V> ctx)
ctx - Context.protected GridDhtTransactionalCacheAdapter(GridCacheContext<K,V> ctx, GridCacheConcurrentMap<K,V> map)
ctx - Cache context.map - Cache map.public void start()
throws GridException
start in class GridCacheAdapter<K,V>GridException - If start failed.public abstract GridNearTransactionalCache<K,V> near()
near in class GridDhtCacheAdapter<K,V>public void dgc()
GridCacheConfiguration.getDgcSuspectLockTimeout() to identify suspect locks.
Method blocks current thread until locks are examined and all DGC requests are sent to remote nodes.
DGC does not remove locks if GridCacheConfiguration.isDgcRemoveLocks()
is set to false.
public void dgc(long suspectLockTimeout,
boolean global,
boolean rmvLocks)
Method blocks current thread until locks are examined and all DGC requests are sent
to remote nodes and (if global is true) all nodes running this cache
will get signal to start GC procedure.
dgc in interface GridCache<K,V>dgc in class GridCacheAdapter<K,V>suspectLockTimeout - Custom suspect lock timeout (should be greater than or equal to 0).global - If true then GC procedure will start on all nodes having this cache.rmvLocks - If false then DGC does not remove locks, just report them to log.public GridFuture<GridCacheTxEx<K,V>> prepareTx(GridNode nearNode, GridNearTxPrepareRequest<K,V> req)
nearNode - Near node that initiated transaction.req - Near prepare request.public GridFuture<GridCacheTx> commitTx(UUID nodeId, GridNearTxFinishRequest<K,V> req)
nodeId - Node ID.req - Request.public GridFuture<GridCacheTx> rollbackTx(UUID nodeId, GridNearTxFinishRequest<K,V> req)
nodeId - Node ID.req - Request.protected void finish(GridCacheContext<K,V> ctx, UUID nodeId, GridCacheTxRemoteEx<K,V> tx, GridDhtTxFinishRequest<K,V> req, Collection<GridCacheTxEntry<K,V>> writes)
ctx - Context.nodeId - Node ID.tx - Transaction.req - Request.writes - Writes.protected final void processDhtTxPrepareRequest(UUID nodeId, GridDhtTxPrepareRequest<K,V> req)
nodeId - Sender node ID.req - Request.protected final void processDhtTxFinishRequest(UUID nodeId, GridDhtTxFinishRequest<K,V> req)
nodeId - Node ID.req - Request.protected final void processDhtTxFinishRequest0(UUID nodeId, GridDhtTxFinishRequest<K,V> req)
nodeId - Node ID.req - Request.protected final void processDhtLockRequest(UUID nodeId, GridDhtLockRequest<K,V> req)
nodeId - Node ID.req - Request.protected final void processDhtLockRequest0(UUID nodeId, GridDhtLockRequest<K,V> req)
nodeId - Node ID.req - Request.protected void processDhtUnlockRequest(UUID nodeId, GridDhtUnlockRequest<K,V> req)
protected void sendReply(UUID nodeId, GridDhtTxFinishRequest<K,V> req)
nodeId - Node id that originated finish request.req - Request.public GridFuture<Boolean> lockAllAsync(@Nullable Collection<? extends K> keys, long timeout, GridCacheTxLocalEx<K,V> txx, boolean isInvalidate, boolean isRead, boolean retval, GridCacheTxIsolation isolation, GridPredicate<GridCacheEntry<K,V>>[] filter)
lockAllAsync in class GridDistributedCacheAdapter<K,V>keys - Keys to lock.timeout - Timeout.txx - TransactionisInvalidate - Invalidation flag.isRead - Indicates whether value is read or written.retval - Flag to return value.isolation - Transaction isolation.filter - Optional filter.public GridDhtFuture<Boolean> lockAllAsyncInternal(@Nullable Collection<? extends K> keys, long timeout, GridCacheTxLocalEx<K,V> txx, boolean isInvalidate, boolean isRead, boolean retval, GridCacheTxIsolation isolation, GridPredicate<GridCacheEntry<K,V>>[] filter)
keys - Keys to lock.timeout - Lock timeout.txx - Transaction.isInvalidate - Invalidate flag.isRead - Read flag.retval - Return value flag.isolation - Transaction isolation.filter - Optional filter.public GridFuture<GridNearLockResponse<K,V>> lockAllAsync(GridNode nearNode, GridNearLockRequest<K,V> req, @Nullable GridPredicate<GridCacheEntry<K,V>>[] filter0)
nearNode - Near node.req - Request.filter0 - Filter.public void removeLocks(UUID nodeId, GridCacheVersion ver, Iterable<? extends K> keys, boolean unmap)
nodeId - Node ID.ver - Version.keys - Keys.unmap - Flag for un-mapping version.Copyright © 2014. All rights reserved.