public class GridDhtTxLocal<K,V> extends GridDhtTxLocalAdapter<K,V> implements GridCacheMappedVersion
IgniteTxLocalAdapter.FinishClosure<T>, IgniteTxLocalAdapter.PLC1<T>, IgniteTxLocalAdapter.PLC2<T>, IgniteTxLocalAdapter.PMC<T>, IgniteTxLocalAdapter.PostLockClosure1<T>, IgniteTxLocalAdapter.PostLockClosure2<T>, IgniteTxLocalAdapter.PostMissClosure<T>IgniteInternalTx.FinalizationStatusdhtMap, nearMapactiveCacheIds, commitErr, doneFlag, implicitRes, minVer, needRetVal, readView, txMap, writeViewcctx, concurrency, endVer, grpLockKey, implicit, implicitSingle, internal, invalidate, isDone, isolation, loc, log, nodeId, onePhaseCommit, startTime, startVer, storeEnabled, subjId, syncCommit, syncRollback, taskName, taskNameHash, threadId, timeout, transform, txNodes, txSize, writeVer, xidVer| Constructor and Description |
|---|
GridDhtTxLocal()
Empty constructor required for
Externalizable. |
GridDhtTxLocal(GridCacheSharedContext<K,V> cctx,
UUID nearNodeId,
GridCacheVersion nearXidVer,
IgniteUuid nearFutId,
IgniteUuid nearMiniId,
long nearThreadId,
boolean implicit,
boolean implicitSingle,
boolean sys,
TransactionConcurrency concurrency,
TransactionIsolation isolation,
long timeout,
boolean invalidate,
boolean storeEnabled,
int txSize,
IgniteTxKey grpLockKey,
boolean partLock,
Map<UUID,Collection<UUID>> txNodes,
UUID subjId,
int taskNameHash) |
| Modifier and Type | Method and Description |
|---|---|
protected IgniteInternalFuture<Boolean> |
addReader(long msgId,
GridDhtCacheEntry<K,V> cached,
IgniteTxEntry<K,V> entry,
long topVer)
Adds reader to cached entry.
|
protected void |
clearPrepareFuture(GridDhtTxPrepareFuture<K,V> fut)
Removes previously created prepare future from atomic reference.
|
IgniteInternalFuture<IgniteInternalTx> |
commitAsync()
Asynchronously commits this transaction by initiating
two-phase-commit process. |
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 IgniteUuid |
nearMiniId() |
protected UUID |
nearNodeId() |
GridCacheVersion |
nearXidVersion() |
UUID |
originatingNodeId()
Gets node ID which directly started this transaction.
|
UUID |
otherNodeId()
Gets ID of additional node involved.
|
IgniteInternalFuture<IgniteInternalTx<K,V>> |
prepareAsync()
Prepare stage.
|
IgniteInternalFuture<IgniteInternalTx<K,V>> |
prepareAsync(Iterable<IgniteTxEntry<K,V>> reads,
Iterable<IgniteTxEntry<K,V>> writes,
Map<IgniteTxKey<K>,GridCacheVersion> verMap,
long msgId,
IgniteUuid nearMiniId,
Map<UUID,Collection<UUID>> txNodes,
boolean last,
Collection<UUID> lastBackups,
IgniteInClosure<GridNearTxPrepareResponse<K,V>> completeCb)
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<K,V> txEntry,
GridCacheEntryEx<K,V> entry)
Updates explicit version for tx entry based on current entry lock owner.
|
protected boolean |
updateNearCache(GridCacheContext<K,V> cacheCtx,
K key,
long topVer)
Checks whether near cache should be updated.
|
addDhtMapping, addEntry, addGroupTxMapping, addInvalidPartition, addNearMapping, mapExplicitLocks, needsCompletedVersions, needsCompletedVersions, pendingVersions, pendingVersions, removeMapping, rollbackaccessPolicy, activeCacheIds, addActiveCache, addEntry, allEntries, alternateVersions, batchStoreCommit, checkValid, commit, commitAfterLock, commitError, commitError, committedVersions, completedBase, completedVersions, empty, enlistWrite, entry, entryEx, entryEx, entryExpireTime, entryTtl, entryTtl, getAllAsync, groupLockAsync, hasWriteKey, implicitSingleResult, implicitSingleResult, init, invokeAsync, isStarted, loadMissing, minVersion, needReturnValue, needReturnValue, onOwnerChanged, partitionLock, peek, postLockWrite, prepare, putAllAsync, putAllDrAsync, readEntries, readMap, readSet, removeAllAsync, removeAllDrAsync, removed, rolledbackVersions, seal, sendTransformedValues, tmCommit, userCommit, userPrepare, userRollback, writeEntries, writeMap, writeSetapplyTransformClosures, awaitCompletion, awaitSignal, checkInternal, close, colocated, commitVersion, commitVersion, concurrency, conflictResolve, done, endTime, endVersion, endVersion, enforceSerializable, equals, evictNearEntry, finalizationStatus, finishFuture, groupLock, groupLockEntry, groupLockKey, hashCode, hasTransforms, implicit, implicitSingle, initCommitVersion, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isNearLocallyMapped, isolation, isRollbackOnly, isSystemInvalidate, local, lock, lockTimeout, log, markFinalizing, markPreparing, near, nodeId, onePhaseCommit, onePhaseCommit, onTimeout, optimistic, optimisticLockEntries, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, proxy, readCommitted, readExternal, readResolve, remainingTime, repeatableRead, replicated, resolveTaskName, serializable, setRollbackOnly, signalAll, size, startTime, startVersion, state, state, store, storeEnabled, storeEnabled, storeUsed, subjectId, syncCommit, syncCommit, syncRollback, syncRollback, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, timeoutId, topologyVersion, topologyVersion, transactionNodes, transactionNodes, uncommit, unlock, user, writeExternal, writeVersion, writeVersion, xid, xidVersionaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, readExternalMeta, removeMeta, removeMeta, replaceMeta, writeExternalMetafinalize, getClass, notify, notifyAll, wait, wait, waitgroupLockEntryaddMeta, close, colocated, commitVersion, commitVersion, concurrency, done, endVersion, endVersion, enforceSerializable, finishFuture, groupLock, groupLockKey, hasTransforms, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, markFinalizing, markPreparing, meta, near, nodeId, onePhaseCommit, optimistic, optimisticLockEntries, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, proxy, readCommitted, remainingTime, removeMeta, repeatableRead, replicated, serializable, setRollbackOnly, size, startTime, startVersion, state, state, storeEnabled, storeUsed, subjectId, syncCommit, syncRollback, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, topologyVersion, topologyVersion, transactionNodes, user, writeVersion, writeVersion, xid, xidVersionendTime, onTimeout, timeoutIdpublic GridDhtTxLocal()
Externalizable.public GridDhtTxLocal(GridCacheSharedContext<K,V> cctx, UUID nearNodeId, GridCacheVersion nearXidVer, IgniteUuid nearFutId, IgniteUuid nearMiniId, long nearThreadId, boolean implicit, boolean implicitSingle, boolean sys, TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, boolean invalidate, boolean storeEnabled, int txSize, @Nullable IgniteTxKey grpLockKey, boolean partLock, 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.grpLockKey - Group lock key if this is a group-lock transaction.partLock - True if this is a group-lock transaction and whole partition should be locked.txNodes - Transaction nodes mapping.public UUID eventNodeId()
eventNodeId in interface IgniteInternalTx<K,V>eventNodeId in class IgniteTxLocalAdapter<K,V>public Collection<UUID> masterNodeIds()
masterNodeIds in interface IgniteInternalTx<K,V>masterNodeIds in class IgniteTxLocalAdapter<K,V>public UUID otherNodeId()
otherNodeId in interface IgniteInternalTx<K,V>otherNodeId in class IgniteTxAdapter<K,V>public UUID originatingNodeId()
originatingNodeId in interface IgniteInternalTx<K,V>originatingNodeId in class IgniteTxLocalAdapter<K,V>protected UUID nearNodeId()
nearNodeId in class GridDhtTxLocalAdapter<K,V>public GridCacheVersion nearXidVersion()
nearXidVersion in interface IgniteInternalTx<K,V>nearXidVersion in class IgniteTxAdapter<K,V>public GridCacheVersion mappedVersion()
mappedVersion in interface GridCacheMappedVersionprotected IgniteUuid nearFutureId()
nearFutureId in class GridDhtTxLocalAdapter<K,V>public void nearFutureId(IgniteUuid nearFutId)
nearFutId - Near future ID.protected IgniteUuid nearMiniId()
nearMiniId in class GridDhtTxLocalAdapter<K,V>public boolean dht()
dht in interface IgniteInternalTx<K,V>dht in class IgniteTxAdapter<K,V>True if DHT transaction.protected boolean updateNearCache(GridCacheContext<K,V> cacheCtx, K key, long topVer)
updateNearCache in class IgniteTxAdapter<K,V>public 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<K,V> cached, IgniteTxEntry<K,V> entry, long topVer)
addReader in class GridDhtTxLocalAdapter<K,V>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<K,V> txEntry, GridCacheEntryEx<K,V> entry) throws GridCacheEntryRemovedException
updateExplicitVersion in class IgniteTxLocalAdapter<K,V>txEntry - Tx entry to update.entry - Entry.GridCacheEntryRemovedException - If entry was concurrently removed.public IgniteInternalFuture<IgniteInternalTx<K,V>> prepareAsync()
prepareAsync in interface IgniteInternalTx<K,V>public IgniteInternalFuture<IgniteInternalTx<K,V>> prepareAsync(@Nullable Iterable<IgniteTxEntry<K,V>> reads, @Nullable Iterable<IgniteTxEntry<K,V>> writes, Map<IgniteTxKey<K>,GridCacheVersion> verMap, long msgId, IgniteUuid nearMiniId, Map<UUID,Collection<UUID>> txNodes, boolean last, Collection<UUID> lastBackups, IgniteInClosure<GridNearTxPrepareResponse<K,V>> completeCb)
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.lastBackups - IDs of backup nodes receiving last prepare request.public IgniteInternalFuture<IgniteInternalTx> commitAsync()
two-phase-commit process.commitAsync in interface IgniteInternalTx<K,V>protected void clearPrepareFuture(GridDhtTxPrepareFuture<K,V> fut)
clearPrepareFuture in class GridDhtTxLocalAdapter<K,V>fut - Expected future.public IgniteInternalFuture<IgniteInternalTx> rollbackAsync()
rollbackAsync in interface IgniteInternalTx<K,V>public boolean finish(boolean commit)
throws IgniteCheckedException
finish in interface IgniteTxLocalEx<K,V>finish in class GridDhtTxLocalAdapter<K,V>commit - 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 GridDhtTxLocalAdapter<K,V>commit - Commit flag.err - Error, if any.public String toString()
toString in class GridDhtTxLocalAdapter<K,V>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 17 2015