public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter
IgniteTxLocalAdapter.FinishClosure<T>, 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 boolean |
mapped
Mapped flag.
|
protected Map<UUID,GridDistributedTxMapping> |
nearMap
Near mappings.
|
COMMIT_ERR_UPD, commitErr, DONE_FLAG_UPD, doneFlag, implicitRes, minVer, needRetVal, txStatecctx, concurrency, endVer, implicit, internal, invalidate, isDone, isolation, loc, log, nodeId, onePhaseCommit, startTime, startVer, storeEnabled, subjId, syncMode, taskName, taskNameHash, threadId, timeout, topVer, transform, 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) |
void |
addLockTransactionNode(ClusterNode node) |
protected abstract IgniteInternalFuture<Boolean> |
addReader(long msgId,
GridDhtCacheEntry cached,
IgniteTxEntry entry,
AffinityTopologyVersion topVer)
Adds reader to cached entry.
|
protected IgniteInternalFuture<GridNearTxPrepareResponse> |
chainOnePhasePrepare(GridDhtTxPrepareFuture prepFut) |
protected abstract void |
clearPrepareFuture(GridDhtTxPrepareFuture fut)
Removes previously created prepare future from atomic reference.
|
boolean |
commitOnPrepare() |
boolean |
explicitLock() |
void |
explicitLock(boolean explicitLock) |
boolean |
finish(boolean commit)
Finishes transaction (either commit or rollback).
|
Set<ClusterNode> |
lockTransactionNodes() |
protected void |
mapExplicitLocks()
Map explicit locks.
|
protected abstract IgniteUuid |
nearFutureId() |
protected abstract UUID |
nearNodeId() |
boolean |
nearOnOriginatingNode()
Gets flag that indicates that originating node has a near cache that participates in this transaction.
|
void |
nearOnOriginatingNode(boolean hasNear)
Sets flag that indicates that originating node has a near cache that participates in this transaction.
|
boolean |
needsCompletedVersions() |
Collection<GridCacheVersion> |
pendingVersions() |
void |
pendingVersions(Collection<GridCacheVersion> pendingVers) |
boolean |
removeMapping(UUID nodeId) |
void |
rollback()
Rolls back this transaction.
|
protected abstract void |
sendFinishReply(boolean commit,
Throwable err) |
String |
toString() |
accessPolicy, accessPolicy, activeCachesDeploymentEnabled, activeCachesDeploymentEnabled, addActiveCache, addEntry, allEntries, alternateVersions, checkValid, commit, commitAfterLock, commitError, commitError, committedVersions, completedBase, completedVersions, empty, entry, entryEx, entryEx, entryExpireTime, entryTtl, eventNodeId, getAllAsync, hasInterceptor, hasWriteKey, implicitSingleResult, init, initResult, invokeAsync, invokeAsync, isStarted, loadMissing, masterNodeIds, minVersion, needReturnValue, needReturnValue, onOwnerChanged, originatingNodeId, peek, postLockWrite, prepare, putAllAsync, putAllDrAsync, putAsync, readEntries, readMap, readSet, removeAllAsync, removeAllDrAsync, rolledbackVersions, seal, sendTransformedValues, tmFinish, txState, updateExplicitVersion, userCommit, userPrepare, userRollback, writeEntries, writeMap, writeSetapplyTransformClosures, batchStoreCommit, checkInternal, close, colocated, commitVersion, commitVersion, concurrency, conflictResolve, currentPrepareFuture, dht, done, endTime, endVersion, equals, errorWhenCommitting, evictNearEntry, finalizationStatus, finishFuture, hashCode, hasTransforms, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isNearLocallyMapped, isolation, isRollbackOnly, isSystemInvalidate, isWriteToStoreFromDhtValid, local, localResult, log, markFinalizing, markPreparing, near, nearXidVersion, nodeId, onePhaseCommit, onePhaseCommit, onRemap, onTimeout, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, proxy, readCommitted, readExternal, readResolve, remainingTime, repeatableRead, replicated, resolveTaskName, serializable, sessionEnd, setRollbackOnly, size, startTime, state, state, storeEnabled, storeEnabled, storeUsed, subjectId, syncMode, syncMode, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, timeoutException, timeoutId, 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, close, colocated, commitAsync, commitVersion, commitVersion, concurrency, currentPrepareFuture, dht, done, endVersion, errorWhenCommitting, finishFuture, hasTransforms, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, localResult, markFinalizing, markPreparing, meta, near, nearXidVersion, nodeId, onePhaseCommit, onRemap, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, prepareAsync, proxy, readCommitted, remainingTime, removeMeta, repeatableRead, replicated, rollbackAsync, serializable, setRollbackOnly, size, startTime, state, state, storeEnabled, storeUsed, subjectId, syncMode, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, user, writeVersion, writeVersion, xid, xidVersionendTime, onTimeout, timeoutIdprotected Map<UUID,GridDistributedTxMapping> nearMap
protected Map<UUID,GridDistributedTxMapping> dhtMap
protected volatile boolean mapped
protected boolean explicitLock
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 addLockTransactionNode(ClusterNode node)
node - Node.public void nearOnOriginatingNode(boolean hasNear)
hasNear - Has near cache flag.public boolean nearOnOriginatingNode()
public boolean explicitLock()
True if explicit lock transaction.public void explicitLock(boolean explicitLock)
explicitLock - Explicit lock flag.@Nullable public Set<ClusterNode> lockTransactionNodes()
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(boolean commit,
@Nullable
Throwable err)
commit - Commit flag.err - Error, if any.public boolean needsCompletedVersions()
needsCompletedVersions in interface IgniteInternalTxneedsCompletedVersions in class IgniteTxAdapterTrue if transaction needs completed versions for processing.public Collection<GridCacheVersion> pendingVersions()
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 finish(boolean commit)
throws IgniteCheckedException
commit - True if commit, false if rollback.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.protected final IgniteInternalFuture<GridNearTxPrepareResponse> chainOnePhasePrepare(GridDhtTxPrepareFuture prepFut)
prepFut - Prepare future.public void rollback()
throws IgniteCheckedException
IgniteCheckedException - If rollback failed.public String toString()
toString in class IgniteTxLocalAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 1.7.0 Release Date : August 1 2016