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<Boolean> |
lockFut
Enlist or lock future what is currently in progress.
|
protected boolean |
mapped
Mapped flag.
|
protected Map<UUID,GridDistributedTxMapping> |
nearMap
Near mappings.
|
protected static IgniteInternalFuture<Boolean> |
ROLLBACK_FUT
Asynchronous rollback marker for lock futures.
|
COMMIT_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| Modifier | Constructor and Description |
|---|---|
protected |
GridDhtTxLocalAdapter()
Empty constructor required for
Externalizable. |
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,
UUID subjId,
int taskNameHash) |
| Modifier and Type | Method and Description |
|---|---|
IgniteInternalFuture<Boolean> |
addEntry(long msgId,
IgniteTxEntry e) |
void |
addInvalidPartition(GridCacheContext ctx,
int part) |
protected abstract IgniteInternalFuture<Boolean> |
addReader(long msgId,
GridDhtCacheEntry cached,
IgniteTxEntry entry,
AffinityTopologyVersion topVer)
Adds reader to cached entry.
|
protected IgniteInternalFuture<GridNearTxPrepareResponse> |
chainOnePhasePrepare(GridDhtTxPrepareFuture prepFut) |
void |
clearLockFuture(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) |
boolean |
localFinish(boolean commit,
boolean clearThreadMap)
Finishes transaction (either commit or rollback).
|
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(Throwable err) |
String |
toString() |
IgniteInternalFuture<?> |
tryRollbackAsync()
Prepare async rollback.
|
boolean |
updateLockFuture(IgniteInternalFuture<?> oldFut,
IgniteInternalFuture<?> newFut)
Atomically updates lock future.
|
accessPolicy, accessPolicy, activeCachesDeploymentEnabled, activeCachesDeploymentEnabled, addActiveCache, addEntry, addInvokeResult, allEntries, alternateVersions, checkValid, checkValid, commitAfterLock, commitError, commitError, committedVersions, completedBase, completedVersions, empty, entry, entryEx, entryEx, entryExpireTime, entryTtl, eventNodeId, hasInterceptor, hasWriteKey, implicitSingleResult, init, initResult, isStarted, masterNodeIds, minVersion, onOwnerChanged, originatingNodeId, peek, postLockWrite, readEntries, readMap, readSet, rolledbackVersions, seal, sendTransformedValues, syncMode, syncMode, tmFinish, txState, updateExplicitVersion, userCommit, userPrepare, userRollback, writeEntries, writeMap, writeSetapplyTransformClosures, batchStoreCommit, checkInternal, colocated, commitVersion, commitVersion, concurrency, conflictResolve, context, currentPrepareFuture, dht, 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, nearXidVersion, needReturnValue, needReturnValue, nodeId, onePhaseCommit, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, readExternal, readResolve, remainingTime, remote, repeatableRead, resolveTaskName, rollbackException, 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, updateNearCache, 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, commitAsync, commitVersion, commitVersion, concurrency, currentPrepareFuture, dht, done, endVersion, errorWhenCommitting, finishFuture, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, localResult, markFinalizing, meta, near, nearXidVersion, nodeId, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, remainingTime, removeMeta, repeatableRead, rollbackAsync, salvageTx, serializable, setRollbackOnly, size, startTime, state, state, storeEnabled, storeWriteThrough, subjectId, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, user, writeVersion, writeVersion, xid, xidVersionprotected 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<Boolean> lockFut
protected GridDhtTxLocalAdapter()
Externalizable.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)
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 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
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(GridCacheContext ctx, int part)
addInvalidPartition in interface IgniteInternalTxaddInvalidPartition in class IgniteTxAdapterctx - Cache context.part - Invalid partition.@Nullable public 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 boolean updateLockFuture(IgniteInternalFuture<?> oldFut, IgniteInternalFuture<?> newFut)
oldFut - Old future.newFut - New future.true If future was changed.public void clearLockFuture(@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 IgniteInternalFuture<?> tryRollbackAsync()
protected final IgniteInternalFuture<GridNearTxPrepareResponse> chainOnePhasePrepare(GridDhtTxPrepareFuture prepFut)
prepFut - Prepare future.public String toString()
toString in class IgniteTxLocalAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018