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.EntryKey
IgniteInternalTx.FinalizationStatus
dhtMap, explicitLock, mapped, nearMap
COMMIT_ERR_UPD, commitErr, DONE_FLAG_UPD, doneFlag, implicitRes, minVer, syncMode, txState
cctx, concurrency, 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)
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(Collection<IgniteTxEntry> reads,
Collection<IgniteTxEntry> writes,
Map<IgniteTxKey,GridCacheVersion> verMap,
long msgId,
int nearMiniId,
Map<UUID,Collection<UUID>> txNodes,
boolean last)
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, removeMapping
accessPolicy, 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, writeSet
applyTransformClosures, batchStoreCommit, checkInternal, colocated, commitVersion, commitVersion, concurrency, conflictResolve, 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, 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, xidVersion
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, readExternalMeta, removeAllMeta, removeMeta, removeMeta, replaceMeta, writeExternalMeta
finalize, getClass, notify, notifyAll, wait, wait, wait
addMeta, 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, xidVersion
public 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 IgniteInternalTx
eventNodeId
in class IgniteTxLocalAdapter
public Collection<UUID> masterNodeIds()
masterNodeIds
in interface IgniteInternalTx
masterNodeIds
in class IgniteTxLocalAdapter
public UUID otherNodeId()
otherNodeId
in interface IgniteInternalTx
otherNodeId
in class IgniteTxAdapter
public UUID originatingNodeId()
originatingNodeId
in interface IgniteInternalTx
originatingNodeId
in class IgniteTxLocalAdapter
protected UUID nearNodeId()
nearNodeId
in class GridDhtTxLocalAdapter
public GridCacheVersion nearXidVersion()
nearXidVersion
in interface IgniteInternalTx
nearXidVersion
in class IgniteTxAdapter
public GridCacheVersion mappedVersion()
mappedVersion
in interface GridCacheMappedVersion
protected IgniteUuid nearFutureId()
nearFutureId
in class GridDhtTxLocalAdapter
public void nearFutureId(IgniteUuid nearFutId)
nearFutId
- Near future ID.public boolean dht()
dht
in interface IgniteInternalTx
dht
in class IgniteTxAdapter
True
if DHT transaction.protected boolean updateNearCache(GridCacheContext cacheCtx, KeyCacheObject key, AffinityTopologyVersion topVer)
updateNearCache
in class IgniteTxAdapter
public 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 GridDhtTxLocalAdapter
msgId
- 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 IgniteTxLocalAdapter
txEntry
- Tx entry to update.entry
- Entry.GridCacheEntryRemovedException
- If entry was concurrently removed.public IgniteInternalFuture<?> salvageTx()
salvageTx
in interface IgniteInternalTx
public final IgniteInternalFuture<GridNearTxPrepareResponse> prepareAsync(@Nullable Collection<IgniteTxEntry> reads, @Nullable Collection<IgniteTxEntry> writes, Map<IgniteTxKey,GridCacheVersion> verMap, long msgId, int nearMiniId, Map<UUID,Collection<UUID>> txNodes, boolean last)
reads
- Read entries.writes
- Write entries.verMap
- Version map.msgId
- Message ID.nearMiniId
- Near mini future ID.txNodes
- Transaction nodes mapping.last
- True
if this is last prepare request.public IgniteInternalFuture<IgniteInternalTx> commitDhtLocalAsync()
public IgniteInternalFuture<IgniteInternalTx> commitAsync()
two-phase-commit
process.commitAsync
in interface IgniteInternalTx
protected void clearPrepareFuture(GridDhtTxPrepareFuture fut)
clearPrepareFuture
in class GridDhtTxLocalAdapter
fut
- Expected future.public void rollbackDhtLocal() throws IgniteCheckedException
IgniteCheckedException
- If failed.public IgniteInternalFuture<IgniteInternalTx> rollbackDhtLocalAsync()
public IgniteInternalFuture<IgniteInternalTx> rollbackAsync()
rollbackAsync
in interface IgniteInternalTx
public boolean localFinish(boolean commit) throws IgniteCheckedException
localFinish
in interface IgniteTxLocalEx
localFinish
in class GridDhtTxLocalAdapter
commit
- True
if commit, false
if rollback.True
if state has been changed.IgniteCheckedException
- If finish failed.protected void sendFinishReply(@Nullable Throwable err)
sendFinishReply
in class GridDhtTxLocalAdapter
err
- Error, if any.@Nullable public IgniteInternalFuture<?> currentPrepareFuture()
currentPrepareFuture
in interface IgniteInternalTx
currentPrepareFuture
in class IgniteTxAdapter
public String toString()
toString
in class GridDhtTxLocalAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017