public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter
IgniteTxLocalAdapter.PLC1<T>, IgniteTxLocalAdapter.PLC2<T>, IgniteTxLocalAdapter.PMC<T>, IgniteTxLocalAdapter.PostLockClosure1<T>, IgniteTxLocalAdapter.PostLockClosure2<T>, IgniteTxLocalAdapter.PostMissClosure<T>GridMetadataAwareAdapter.EntryKeyIgniteInternalTx.FinalizationStatus| Modifier and Type | Field and Description |
|---|---|
protected Map<UUID,GridDistributedTxMapping> |
dhtMap
DHT mappings.
|
protected boolean |
explicitLock |
protected IgniteInternalFuture<?> |
lockFut
Enlist or lock future what is currently in progress.
|
protected boolean |
mapped
Mapped flag.
|
protected Map<UUID,GridDistributedTxMapping> |
nearMap
Near mappings.
|
static IgniteInternalFuture<Boolean> |
ROLLBACK_FUT
Asynchronous rollback marker for lock futures.
|
COMMIT_ERR_UPD, commitErr, DONE_FLAG_UPD, doneFlag, implicitRes, minVer, qryEnlisted, syncMode, txStatecctx, concurrency, consistentIdMapper, deploymentLdrId, implicit, internal, invalidate, isDone, isolation, loc, log, mvccSnapshot, needRetVal, nodeId, onePhaseCommit, startTime, startTimeNanos, storeEnabled, subjId, taskName, taskNameHash, threadId, timeout, topVer, txNodes, txSize, writeVer, xidVer| Modifier | Constructor and Description |
|---|---|
protected |
GridDhtTxLocalAdapter(GridCacheSharedContext cctx,
GridCacheVersion xidVer,
boolean implicit,
boolean implicitSingle,
boolean sys,
boolean explicitLock,
byte plc,
TransactionConcurrency concurrency,
TransactionIsolation isolation,
long timeout,
boolean invalidate,
boolean storeEnabled,
boolean onePhaseCommit,
int txSize,
@Nullable UUID subjId,
int taskNameHash) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable IgniteInternalFuture<Boolean> |
addEntry(long msgId,
IgniteTxEntry e) |
void |
addInvalidPartition(int cacheId,
int part) |
protected abstract @Nullable IgniteInternalFuture<Boolean> |
addReader(long msgId,
GridDhtCacheEntry cached,
IgniteTxEntry entry,
AffinityTopologyVersion topVer)
Adds reader to cached entry.
|
protected IgniteInternalFuture<GridNearTxPrepareResponse> |
chainOnePhasePrepare(GridDhtTxPrepareFuture prepFut) |
void |
clearLockFuture(@Nullable IgniteInternalFuture cond)
Clears lock future.
|
protected abstract void |
clearPrepareFuture(GridDhtTxPrepareFuture fut)
Removes previously created prepare future from atomic reference.
|
boolean |
commitOnPrepare() |
boolean |
explicitLock() |
void |
explicitLock(boolean explicitLock) |
<T> GridFutureAdapter<T> |
finishFuture(GridFutureAdapter<T> f,
Throwable err,
boolean clearLockFut) |
void |
incrementLockCounter()
Increments lock counter.
|
boolean |
localFinish(boolean commit,
boolean clearThreadMap)
Finishes transaction (either commit or rollback).
|
int |
lockCounter() |
IgniteInternalFuture<?> |
lockFuture() |
protected void |
mapExplicitLocks()
Map explicit locks.
|
protected abstract IgniteUuid |
nearFutureId() |
protected abstract UUID |
nearNodeId() |
void |
nearOnOriginatingNode(boolean hasNear)
Sets flag that indicates that originating node has a near cache that participates in this transaction.
|
boolean |
needsCompletedVersions() |
void |
pendingVersions(Collection<GridCacheVersion> pendingVers) |
boolean |
removeMapping(UUID nodeId) |
protected abstract void |
sendFinishReply(@Nullable Throwable err) |
Span |
span() |
void |
span(Span span) |
String |
toString() |
@Nullable IgniteInternalFuture<?> |
tryRollbackAsync()
Prepare async rollback.
|
boolean |
updateLockFuture(IgniteInternalFuture<?> oldFut,
IgniteInternalFuture<?> newFut)
Atomically updates lock future.
|
accessPolicy, accessPolicy, activeCachesDeploymentEnabled, activeCachesDeploymentEnabled, addActiveCache, addEntry, addInvokeResult, allEntries, alternateVersions, calculatePartitionUpdateCounters, checkValid, checkValid, commitAfterLock, commitError, commitError, committedVersions, completedBase, completedVersions, empty, entry, entryEx, entryEx, entryExpireTime, entryTtl, eventNodeId, hasInterceptor, hasWriteKey, implicitSingleResult, init, initResult, isStarted, markQueryEnlisted, masterNodeIds, minVersion, onOwnerChanged, originatingNodeId, partsMap, peek, postLockWrite, queryEnlisted, readEntries, readMap, readSet, rolledbackVersions, seal, sendTransformedValues, syncMode, syncMode, tmFinish, touchPartition, txState, updateExplicitVersion, userCommit, userPrepare, userRollback, writeEntries, writeMap, writeSetapplyTransformClosures, applyTxSizes, batchStoreCommit, chainState, checkInternal, colocated, commitVersion, commitVersion, concurrency, conflictResolve, context, currentPrepareFuture, dht, done, equals, errorWhenCommitting, evictNearEntry, finalizationStatus, finishFuture, hashCode, heuristicException, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isNearLocallyMapped, isolation, isRollbackOnly, isSystemInvalidate, isWriteToStoreFromDhtValid, local, localResult, log, logTxFinishErrorSafe, markFinalizing, mvccSnapshot, mvccSnapshot, near, nearXidVersion, needReturnValue, needReturnValue, nodeId, onePhaseCommit, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, recordStateChangedEvent, remainingTime, remote, repeatableRead, resolveTaskName, rollbackException, rollbackFuture, rollbackFuture, serializable, sessionEnd, setParentTx, setRollbackOnly, size, skipCompletedVersions, skipCompletedVersions, startTime, startTimeNanos, state, state, state, storeEnabled, storeEnabled, storeWriteThrough, subjectId, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, timeoutException, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, transactionNodes, txCounters, uncommit, updateNearCache, user, writeVersion, writeVersion, xid, xidVersionaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, removeAllMeta, removeMeta, removeMeta, replaceMetafinalize, getClass, notify, notifyAll, wait, wait, waitaddMeta, colocated, commitAsync, commitVersion, commitVersion, concurrency, currentPrepareFuture, dht, done, errorWhenCommitting, finalizationStatus, finishFuture, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, label, local, localResult, markFinalizing, meta, mvccSnapshot, mvccSnapshot, near, nearXidVersion, nodeId, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, remainingTime, removeMeta, repeatableRead, rollbackAsync, salvageTx, serializable, setRollbackOnly, size, startTime, startTimeNanos, state, state, storeEnabled, storeWriteThrough, subjectId, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, txCounters, user, writeVersion, writeVersion, xid, xidVersionpublic static final IgniteInternalFuture<Boolean> ROLLBACK_FUT
protected Map<UUID,GridDistributedTxMapping> nearMap
protected Map<UUID,GridDistributedTxMapping> dhtMap
protected volatile boolean mapped
protected boolean explicitLock
@GridToStringExclude protected volatile IgniteInternalFuture<?> lockFut
protected GridDhtTxLocalAdapter(GridCacheSharedContext cctx, GridCacheVersion xidVer, boolean implicit, boolean implicitSingle, boolean sys, boolean explicitLock, byte plc, TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, boolean invalidate, boolean storeEnabled, boolean onePhaseCommit, int txSize, @Nullable @Nullable UUID subjId, int taskNameHash)
xidVer - Transaction version.implicit - Implicit flag.implicitSingle - Implicit-with-single-key flag.cctx - Cache context.sys - System flag.concurrency - Concurrency.isolation - Isolation.timeout - Timeout.txSize - Expected transaction size.public void nearOnOriginatingNode(boolean hasNear)
hasNear - Has near cache flag.public boolean explicitLock()
True if explicit lock transaction.public void explicitLock(boolean explicitLock)
explicitLock - Explicit lock flag.protected abstract UUID nearNodeId()
protected abstract IgniteUuid nearFutureId()
@Nullable protected abstract @Nullable IgniteInternalFuture<Boolean> addReader(long msgId, GridDhtCacheEntry cached, IgniteTxEntry entry, AffinityTopologyVersion topVer)
msgId - Message ID.cached - Cached entry.entry - Transaction entry.topVer - Topology version.True if reader was added as a result of this call.protected abstract void sendFinishReply(@Nullable
@Nullable Throwable err)
err - Error, if any.public boolean needsCompletedVersions()
needsCompletedVersions in interface IgniteInternalTxneedsCompletedVersions in class IgniteTxAdapterTrue if transaction needs completed versions for processing.public void pendingVersions(Collection<GridCacheVersion> pendingVers)
pendingVers - Versions for all pending locks that were in queue before tx locsk were released.protected void mapExplicitLocks()
public boolean removeMapping(UUID nodeId)
nodeId - Node ID.True if mapping was removed.public void addInvalidPartition(int cacheId,
int part)
addInvalidPartition in interface IgniteInternalTxaddInvalidPartition in class IgniteTxAdaptercacheId - Cache id.part - Invalid partition.@Nullable public @Nullable IgniteInternalFuture<Boolean> addEntry(long msgId, IgniteTxEntry e) throws IgniteCheckedException
msgId - Message ID.e - Entry to add.IgniteCheckedException - If failed.public boolean localFinish(boolean commit,
boolean clearThreadMap)
throws IgniteCheckedException
commit - 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 abstract void clearPrepareFuture(GridDhtTxPrepareFuture fut)
fut - Expected future.public final boolean commitOnPrepare()
True if transaction is finished on prepare step.public IgniteInternalFuture<?> lockFuture()
public boolean updateLockFuture(IgniteInternalFuture<?> oldFut, IgniteInternalFuture<?> newFut)
oldFut - Old future.newFut - New future.true If future was changed.public void clearLockFuture(@Nullable
@Nullable IgniteInternalFuture cond)
cond - Clear lock condition.public <T> GridFutureAdapter<T> finishFuture(GridFutureAdapter<T> f, Throwable err, boolean clearLockFut)
f - Future to finish.err - Error.clearLockFut - True if need to clear lock future.@Nullable public @Nullable IgniteInternalFuture<?> tryRollbackAsync()
protected final IgniteInternalFuture<GridNearTxPrepareResponse> chainOnePhasePrepare(GridDhtTxPrepareFuture prepFut)
prepFut - Prepare future.public Span span()
public void span(Span span)
span - New tracing span.public String toString()
toString in class IgniteTxLocalAdapterpublic void incrementLockCounter()
public int lockCounter()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.0 Release Date : September 11 2021