public class GridDhtTxLocal extends GridDhtTxLocalAdapter implements GridCacheMappedVersion
IgniteTxLocalAdapter.FinishClosure<T>, 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, 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| Constructor and Description |
|---|
GridDhtTxLocal()
Empty constructor required for
Externalizable. |
GridDhtTxLocal(GridCacheSharedContext cctx,
AffinityTopologyVersion topVer,
UUID nearNodeId,
GridCacheVersion nearXidVer,
IgniteUuid nearFutId,
IgniteUuid 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<?> |
currentPrepareFuture() |
boolean |
dht() |
UUID |
eventNodeId() |
boolean |
finish(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) |
IgniteUuid |
nearFinishMiniId() |
void |
nearFinishMiniId(IgniteUuid 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<?> |
prepareAsync()
Prepare stage.
|
IgniteInternalFuture<GridNearTxPrepareResponse> |
prepareAsync(Collection<IgniteTxEntry> reads,
Collection<IgniteTxEntry> writes,
Map<IgniteTxKey,GridCacheVersion> verMap,
long msgId,
IgniteUuid nearMiniId,
Map<UUID,Collection<UUID>> txNodes,
boolean last)
Prepares next batch of entries in dht transaction.
|
IgniteInternalFuture<IgniteInternalTx> |
rollbackAsync()
Asynchronously rollback this transaction.
|
protected void |
sendFinishReply(boolean commit,
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, addLockTransactionNode, chainOnePhasePrepare, commitOnPrepare, explicitLock, explicitLock, lockTransactionNodes, mapExplicitLocks, nearOnOriginatingNode, nearOnOriginatingNode, needsCompletedVersions, pendingVersions, pendingVersions, removeMapping, rollbackaccessPolicy, accessPolicy, activeCachesDeploymentEnabled, activeCachesDeploymentEnabled, addActiveCache, addEntry, allEntries, alternateVersions, checkValid, commit, commitAfterLock, commitError, commitError, committedVersions, completedBase, completedVersions, empty, entry, entryEx, entryEx, entryExpireTime, entryTtl, getAllAsync, hasInterceptor, hasWriteKey, implicitSingleResult, init, initResult, invokeAsync, invokeAsync, isStarted, loadMissing, minVersion, needReturnValue, needReturnValue, onOwnerChanged, peek, postLockWrite, prepare, putAllAsync, putAllDrAsync, putAsync, readEntries, readMap, readSet, removeAllAsync, removeAllDrAsync, rolledbackVersions, seal, sendTransformedValues, tmFinish, txState, userCommit, userPrepare, userRollback, writeEntries, writeMap, writeSetapplyTransformClosures, batchStoreCommit, checkInternal, close, colocated, commitVersion, commitVersion, concurrency, conflictResolve, 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, nodeId, onePhaseCommit, onePhaseCommit, onRemap, onTimeout, optimistic, optimisticLockEntries, 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, 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, commitVersion, commitVersion, concurrency, done, endVersion, errorWhenCommitting, finishFuture, hasTransforms, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, localResult, markFinalizing, markPreparing, meta, near, nodeId, onePhaseCommit, onRemap, optimistic, optimisticLockEntries, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, proxy, readCommitted, remainingTime, removeMeta, repeatableRead, replicated, 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, timeoutIdpublic GridDhtTxLocal()
Externalizable.public GridDhtTxLocal(GridCacheSharedContext cctx, AffinityTopologyVersion topVer, UUID nearNodeId, GridCacheVersion nearXidVer, IgniteUuid nearFutId, IgniteUuid 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 IgniteUuid nearFinishMiniId()
public void nearFinishMiniId(IgniteUuid 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<?> prepareAsync()
prepareAsync in interface IgniteInternalTxpublic IgniteInternalFuture<GridNearTxPrepareResponse> prepareAsync(@Nullable Collection<IgniteTxEntry> reads, @Nullable Collection<IgniteTxEntry> writes, Map<IgniteTxKey,GridCacheVersion> verMap, long msgId, IgniteUuid 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> commitAsync()
two-phase-commit process.commitAsync in interface IgniteInternalTxprotected void clearPrepareFuture(GridDhtTxPrepareFuture fut)
clearPrepareFuture in class GridDhtTxLocalAdapterfut - Expected future.public IgniteInternalFuture<IgniteInternalTx> rollbackAsync()
rollbackAsync in interface IgniteInternalTxpublic boolean finish(boolean commit)
throws IgniteCheckedException
finish in interface IgniteTxLocalExfinish in class GridDhtTxLocalAdaptercommit - True if commit, false if rollback.True if state has been changed.IgniteCheckedException - If finish failed.protected void sendFinishReply(boolean commit,
@Nullable
Throwable err)
sendFinishReply in class GridDhtTxLocalAdaptercommit - Commit flag.err - 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. 1.6.0 Release Date : May 18 2016