public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter
IgniteTxLocalAdapter.PLC1<T>, IgniteTxLocalAdapter.PLC2<T>, IgniteTxLocalAdapter.PMC<T>, IgniteTxLocalAdapter.PostLockClosure1<T>, IgniteTxLocalAdapter.PostLockClosure2<T>, IgniteTxLocalAdapter.PostMissClosure<T>
GridMetadataAwareAdapter.EntryKey
IgniteInternalTx.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, 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
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) |
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 |
localFinish(boolean commit)
Finishes transaction (either commit or rollback).
|
protected void |
mapExplicitLocks()
Map explicit locks.
|
protected abstract IgniteUuid |
nearFutureId() |
protected abstract UUID |
nearNodeId() |
void |
nearOnOriginatingNode(boolean hasNear)
Sets flag that indicates that originating node has a near cache that participates in this transaction.
|
boolean |
needsCompletedVersions() |
void |
pendingVersions(Collection<GridCacheVersion> pendingVers) |
boolean |
removeMapping(UUID nodeId) |
protected abstract void |
sendFinishReply(Throwable err) |
String |
toString() |
accessPolicy, accessPolicy, activeCachesDeploymentEnabled, activeCachesDeploymentEnabled, addActiveCache, addEntry, addInvokeResult, allEntries, alternateVersions, checkValid, commitAfterLock, commitError, commitError, committedVersions, completedBase, completedVersions, empty, entry, entryEx, entryEx, entryExpireTime, entryTtl, eventNodeId, hasInterceptor, hasWriteKey, implicitSingleResult, init, initResult, isStarted, masterNodeIds, minVersion, onOwnerChanged, originatingNodeId, peek, postLockWrite, readEntries, readMap, readSet, rolledbackVersions, seal, sendTransformedValues, syncMode, syncMode, tmFinish, txState, updateExplicitVersion, userCommit, userPrepare, userRollback, writeEntries, writeMap, writeSet
applyTransformClosures, batchStoreCommit, checkInternal, colocated, commitVersion, commitVersion, concurrency, conflictResolve, currentPrepareFuture, dht, 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, nearXidVersion, needReturnValue, needReturnValue, nodeId, onePhaseCommit, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, 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, updateNearCache, 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, commitAsync, commitVersion, commitVersion, concurrency, currentPrepareFuture, dht, done, endVersion, errorWhenCommitting, finishFuture, implicit, implicitSingle, internal, invalidate, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, localResult, markFinalizing, meta, near, nearXidVersion, nodeId, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, remainingTime, removeMeta, repeatableRead, rollbackAsync, salvageTx, 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
protected 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 nearOnOriginatingNode(boolean hasNear)
hasNear
- Has near cache flag.public boolean explicitLock()
True
if explicit lock transaction.public void explicitLock(boolean explicitLock)
explicitLock
- Explicit lock flag.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(@Nullable Throwable err)
err
- Error, if any.public boolean needsCompletedVersions()
needsCompletedVersions
in interface IgniteInternalTx
needsCompletedVersions
in class IgniteTxAdapter
True
if transaction needs completed versions for processing.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 IgniteInternalTx
addInvalidPartition
in class IgniteTxAdapter
ctx
- 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 localFinish(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 String toString()
toString
in class IgniteTxLocalAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017