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>IgniteInternalTx.FinalizationStatus| Modifier and Type | Field and Description |
|---|---|
protected Map<UUID,GridDistributedTxMapping> |
dhtMap
DHT mappings.
|
protected boolean |
explicitLock |
protected AtomicBoolean |
mapped
Mapped flag.
|
protected Map<UUID,GridDistributedTxMapping> |
nearMap
Near mappings.
|
activeCacheIds, commitErr, doneFlag, implicitRes, minVer, needRetVal, readView, txMap, writeViewcctx, concurrency, endVer, implicit, implicitSingle, internal, invalidate, isDone, isolation, loc, log, nodeId, onePhaseCommit, startTime, startVer, storeEnabled, subjId, syncCommit, syncRollback, 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,
GridIoPolicy plc,
TransactionConcurrency concurrency,
TransactionIsolation isolation,
long timeout,
boolean invalidate,
boolean storeEnabled,
int txSize,
UUID subjId,
int taskNameHash) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDhtMapping(Map<UUID,GridDistributedTxMapping> mappings) |
IgniteInternalFuture<Boolean> |
addEntry(long msgId,
IgniteTxEntry e) |
void |
addInvalidPartition(GridCacheContext ctx,
int part) |
void |
addLockTransactionNode(ClusterNode node) |
void |
addNearMapping(Map<UUID,GridDistributedTxMapping> mappings) |
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.
|
protected 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 IgniteUuid |
nearMiniId() |
protected abstract UUID |
nearNodeId() |
boolean |
needsCompletedVersions() |
void |
needsCompletedVersions(boolean needsCompletedVers) |
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, activeCacheIds, addActiveCache, addEntry, allEntries, alternateVersions, batchStoreCommit, checkValid, commit, commitAfterLock, commitError, commitError, committedVersions, completedBase, completedVersions, empty, enlistWrite, entry, entryEx, entryEx, entryExpireTime, entryTtl, eventNodeId, getAllAsync, hasWriteKey, implicitSingleResult, implicitSingleResult, init, initResult, invokeAsync, isStarted, loadMissing, masterNodeIds, minVersion, needReturnValue, needReturnValue, onOwnerChanged, originatingNodeId, peek, postLockWrite, prepare, putAllAsync, putAllDrAsync, readEntries, readMap, readSet, removeAllAsync, removeAllDrAsync, removed, rolledbackVersions, seal, sendTransformedValues, tmCommit, updateExplicitVersion, userCommit, userPrepare, userRollback, writeEntries, writeMap, writeSetapplyTransformClosures, awaitCompletion, awaitSignal, checkInternal, close, colocated, commitVersion, commitVersion, concurrency, conflictResolve, currentPrepareFuture, dht, done, endTime, endVersion, endVersion, enforceSerializable, equals, evictNearEntry, finalizationStatus, finishFuture, hashCode, hasTransforms, implicit, implicitSingle, initCommitVersion, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isNearLocallyMapped, isolation, isRollbackOnly, isSystemInvalidate, local, localResult, lock, lockTimeout, 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, setRollbackOnly, signalAll, size, startTime, startVersion, state, state, storeEnabled, storeEnabled, stores, storeUsed, subjectId, syncCommit, syncCommit, syncRollback, syncRollback, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, timeoutId, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, transactionNodes, uncommit, unlock, updateNearCache, user, writeExternal, writeVersion, writeVersion, xid, xidVersionaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, readExternalMeta, removeMeta, removeMeta, replaceMeta, writeExternalMetafinalize, getClass, notify, notifyAll, wait, wait, waitaddMeta, close, colocated, commitAsync, commitVersion, commitVersion, concurrency, currentPrepareFuture, dht, done, endVersion, endVersion, enforceSerializable, 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, startVersion, state, state, storeEnabled, storeUsed, subjectId, syncCommit, syncRollback, 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 AtomicBoolean mapped
protected boolean explicitLock
protected GridDhtTxLocalAdapter()
Externalizable.protected GridDhtTxLocalAdapter(GridCacheSharedContext cctx, GridCacheVersion xidVer, boolean implicit, boolean implicitSingle, boolean sys, boolean explicitLock, GridIoPolicy plc, TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, boolean invalidate, boolean storeEnabled, 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.@Nullable public Set<ClusterNode> lockTransactionNodes()
protected abstract UUID nearNodeId()
protected abstract IgniteUuid nearFutureId()
protected abstract IgniteUuid nearMiniId()
@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 void needsCompletedVersions(boolean needsCompletedVers)
needsCompletedVers - True if needs completed versions.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.public boolean explicitLock()
public void explicitLock(boolean explicitLock)
explicitLock - Explicit lock flag.protected void mapExplicitLocks()
public void addDhtMapping(Map<UUID,GridDistributedTxMapping> mappings)
mappings - Mappings to add.public void addNearMapping(Map<UUID,GridDistributedTxMapping> mappings)
mappings - Mappings to add.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.protected 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.2.0-incubating Release Date : June 16 2015