public class GridDhtTxLocal extends GridDhtTxLocalAdapter implements GridCacheMappedVersion
IgniteTxLocalAdapter.PLC1<T>, IgniteTxLocalAdapter.PLC2<T>, IgniteTxLocalAdapter.PMC<T>, IgniteTxLocalAdapter.PostLockClosure1<T>, IgniteTxLocalAdapter.PostLockClosure2<T>, IgniteTxLocalAdapter.PostMissClosure<T>GridMetadataAwareAdapter.EntryKeyIgniteInternalTx.FinalizationStatusdhtMap, explicitLock, mapped, nearMapCOMMIT_ERR_UPD, commitErr, DONE_FLAG_UPD, doneFlag, implicitRes, minVer, syncMode, txStatecctx, concurrency, consistentIdMapper, endVer, implicit, internal, invalidate, isDone, isolation, loc, log, needRetVal, nodeId, onePhaseCommit, startTime, startVer, storeEnabled, subjId, taskName, taskNameHash, threadId, timeout, topVer, txNodes, txSize, writeVer, xidVer| Constructor and Description |
|---|
GridDhtTxLocal()
Empty constructor required for
Externalizable. |
GridDhtTxLocal(GridCacheSharedContext cctx,
AffinityTopologyVersion topVer,
UUID nearNodeId,
GridCacheVersion nearXidVer,
IgniteUuid nearFutId,
int nearMiniId,
long nearThreadId,
boolean implicit,
boolean implicitSingle,
boolean sys,
boolean explicitLock,
byte plc,
TransactionConcurrency concurrency,
TransactionIsolation isolation,
long timeout,
boolean invalidate,
boolean storeEnabled,
boolean onePhaseCommit,
int txSize,
Map<UUID,Collection<UUID>> txNodes,
UUID subjId,
int taskNameHash) |
| Modifier and Type | Method and Description |
|---|---|
protected IgniteInternalFuture<Boolean> |
addReader(long msgId,
GridDhtCacheEntry cached,
IgniteTxEntry entry,
AffinityTopologyVersion topVer)
Adds reader to cached entry.
|
protected void |
clearPrepareFuture(GridDhtTxPrepareFuture fut)
Removes previously created prepare future from atomic reference.
|
IgniteInternalFuture<IgniteInternalTx> |
commitAsync()
Asynchronously commits this transaction by initiating
two-phase-commit process. |
IgniteInternalFuture<IgniteInternalTx> |
commitDhtLocalAsync() |
IgniteInternalFuture<?> |
currentPrepareFuture() |
boolean |
dht() |
UUID |
eventNodeId() |
boolean |
localFinish(boolean commit,
boolean clearThreadMap)
Finishes transaction (either commit or rollback).
|
GridCacheVersion |
mappedVersion()
Mapping should occur only if this interface returns a non-null value.
|
Collection<UUID> |
masterNodeIds() |
IgniteUuid |
nearFinishFutureId() |
void |
nearFinishFutureId(IgniteUuid nearFinFutId) |
void |
nearFinishMiniId(int nearFinMiniId) |
protected IgniteUuid |
nearFutureId() |
void |
nearFutureId(IgniteUuid nearFutId) |
protected UUID |
nearNodeId() |
GridCacheVersion |
nearXidVersion() |
UUID |
originatingNodeId()
Gets node ID which directly started this transaction.
|
UUID |
otherNodeId()
Gets ID of additional node involved.
|
IgniteInternalFuture<GridNearTxPrepareResponse> |
prepareAsync(GridNearTxPrepareRequest req)
Prepares next batch of entries in dht transaction.
|
IgniteInternalFuture<IgniteInternalTx> |
rollbackAsync()
Asynchronously rollback this transaction.
|
void |
rollbackDhtLocal() |
IgniteInternalFuture<IgniteInternalTx> |
rollbackDhtLocalAsync() |
IgniteInternalFuture<?> |
salvageTx() |
protected void |
sendFinishReply(Throwable err) |
String |
toString() |
protected void |
updateExplicitVersion(IgniteTxEntry txEntry,
GridCacheEntryEx entry)
Updates explicit version for tx entry based on current entry lock owner.
|
protected boolean |
updateNearCache(GridCacheContext cacheCtx,
KeyCacheObject key,
AffinityTopologyVersion topVer)
Checks whether near cache should be updated.
|
addEntry, addInvalidPartition, chainOnePhasePrepare, commitOnPrepare, explicitLock, explicitLock, mapExplicitLocks, nearOnOriginatingNode, needsCompletedVersions, pendingVersions, removeMappingaccessPolicy, accessPolicy, activeCachesDeploymentEnabled, activeCachesDeploymentEnabled, addActiveCache, addEntry, addInvokeResult, allEntries, alternateVersions, checkValid, commitAfterLock, commitError, commitError, committedVersions, completedBase, completedVersions, empty, entry, entryEx, entryEx, entryExpireTime, entryTtl, hasInterceptor, hasWriteKey, implicitSingleResult, init, initResult, isStarted, minVersion, onOwnerChanged, peek, postLockWrite, readEntries, readMap, readSet, rolledbackVersions, seal, sendTransformedValues, syncMode, syncMode, tmFinish, txState, userCommit, userPrepare, userRollback, writeEntries, writeMap, writeSetapplyTransformClosures, batchStoreCommit, checkInternal, colocated, commitVersion, commitVersion, concurrency, conflictResolve, context, done, endVersion, equals, errorWhenCommitting, evictNearEntry, finalizationStatus, finishFuture, hashCode, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isNearLocallyMapped, isolation, isRollbackOnly, isSystemInvalidate, isWriteToStoreFromDhtValid, local, localResult, log, markFinalizing, near, needReturnValue, needReturnValue, nodeId, onePhaseCommit, onePhaseCommit, optimistic, optimisticLockEntries, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, readExternal, readResolve, remainingTime, remote, repeatableRead, resolveTaskName, serializable, sessionEnd, setRollbackOnly, size, startTime, state, state, state, storeEnabled, storeEnabled, storeWriteThrough, subjectId, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, timeoutException, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, transactionNodes, uncommit, user, writeExternal, writeVersion, writeVersion, xid, xidVersionaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, readExternalMeta, removeAllMeta, removeMeta, removeMeta, replaceMeta, writeExternalMetafinalize, getClass, notify, notifyAll, wait, wait, waitaddMeta, colocated, commitVersion, commitVersion, concurrency, done, endVersion, errorWhenCommitting, finishFuture, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, localResult, markFinalizing, meta, near, nodeId, onePhaseCommit, optimistic, optimisticLockEntries, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, remainingTime, removeMeta, repeatableRead, serializable, setRollbackOnly, size, startTime, state, state, storeEnabled, storeWriteThrough, subjectId, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, user, writeVersion, writeVersion, xid, xidVersionpublic GridDhtTxLocal()
Externalizable.public GridDhtTxLocal(GridCacheSharedContext cctx, AffinityTopologyVersion topVer, UUID nearNodeId, GridCacheVersion nearXidVer, IgniteUuid nearFutId, int nearMiniId, long nearThreadId, boolean implicit, boolean implicitSingle, boolean sys, boolean explicitLock, byte plc, TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, boolean invalidate, boolean storeEnabled, boolean onePhaseCommit, int txSize, Map<UUID,Collection<UUID>> txNodes, UUID subjId, int taskNameHash)
nearNodeId - Near node ID that initiated transaction.nearXidVer - Near transaction ID.nearFutId - Near future ID.nearMiniId - Near mini future ID.nearThreadId - Near thread ID.implicit - Implicit flag.implicitSingle - Implicit-with-single-key flag.cctx - Cache context.concurrency - Concurrency.isolation - Isolation.timeout - Timeout.storeEnabled - Store enabled flag.txSize - Expected transaction size.txNodes - Transaction nodes mapping.public UUID eventNodeId()
eventNodeId in interface IgniteInternalTxeventNodeId in class IgniteTxLocalAdapterpublic Collection<UUID> masterNodeIds()
masterNodeIds in interface IgniteInternalTxmasterNodeIds in class IgniteTxLocalAdapterpublic UUID otherNodeId()
otherNodeId in interface IgniteInternalTxotherNodeId in class IgniteTxAdapterpublic UUID originatingNodeId()
originatingNodeId in interface IgniteInternalTxoriginatingNodeId in class IgniteTxLocalAdapterprotected UUID nearNodeId()
nearNodeId in class GridDhtTxLocalAdapterpublic GridCacheVersion nearXidVersion()
nearXidVersion in interface IgniteInternalTxnearXidVersion in class IgniteTxAdapterpublic GridCacheVersion mappedVersion()
mappedVersion in interface GridCacheMappedVersionprotected IgniteUuid nearFutureId()
nearFutureId in class GridDhtTxLocalAdapterpublic void nearFutureId(IgniteUuid nearFutId)
nearFutId - Near future ID.public boolean dht()
dht in interface IgniteInternalTxdht in class IgniteTxAdapterTrue if DHT transaction.protected boolean updateNearCache(GridCacheContext cacheCtx, KeyCacheObject key, AffinityTopologyVersion topVer)
updateNearCache in class IgniteTxAdapterpublic IgniteUuid nearFinishFutureId()
public void nearFinishFutureId(IgniteUuid nearFinFutId)
nearFinFutId - Near future ID.public void nearFinishMiniId(int nearFinMiniId)
nearFinMiniId - Near future mini ID.@Nullable protected IgniteInternalFuture<Boolean> addReader(long msgId, GridDhtCacheEntry cached, IgniteTxEntry entry, AffinityTopologyVersion topVer)
addReader in class GridDhtTxLocalAdaptermsgId - Message ID.cached - Cached entry.entry - Transaction entry.topVer - Topology version.True if reader was added as a result of this call.protected void updateExplicitVersion(IgniteTxEntry txEntry, GridCacheEntryEx entry) throws GridCacheEntryRemovedException
updateExplicitVersion in class IgniteTxLocalAdaptertxEntry - Tx entry to update.entry - Entry.GridCacheEntryRemovedException - If entry was concurrently removed.public IgniteInternalFuture<?> salvageTx()
salvageTx in interface IgniteInternalTxpublic final IgniteInternalFuture<GridNearTxPrepareResponse> prepareAsync(GridNearTxPrepareRequest req)
req - Prepare request.public IgniteInternalFuture<IgniteInternalTx> commitDhtLocalAsync()
public IgniteInternalFuture<IgniteInternalTx> commitAsync()
two-phase-commit process.commitAsync in interface IgniteInternalTxprotected void clearPrepareFuture(GridDhtTxPrepareFuture fut)
clearPrepareFuture in class GridDhtTxLocalAdapterfut - Expected future.public void rollbackDhtLocal()
throws IgniteCheckedException
IgniteCheckedException - If failed.public IgniteInternalFuture<IgniteInternalTx> rollbackDhtLocalAsync()
public IgniteInternalFuture<IgniteInternalTx> rollbackAsync()
rollbackAsync in interface IgniteInternalTxpublic boolean localFinish(boolean commit,
boolean clearThreadMap)
throws IgniteCheckedException
localFinish in interface IgniteTxLocalExlocalFinish in class GridDhtTxLocalAdaptercommit - True if commit, false if rollback.clearThreadMap - If true removes GridNearTxLocal from thread map.True if state has been changed.IgniteCheckedException - If finish failed.protected void sendFinishReply(@Nullable
Throwable err)
sendFinishReply in class GridDhtTxLocalAdaptererr - Error, if any.@Nullable public IgniteInternalFuture<?> currentPrepareFuture()
currentPrepareFuture in interface IgniteInternalTxcurrentPrepareFuture in class IgniteTxAdapterpublic String toString()
toString in class GridDhtTxLocalAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 2.4.0 Release Date : March 5 2018