public abstract class GridDistributedTxRemoteAdapter extends IgniteTxAdapter implements IgniteTxRemoteEx
GridMetadataAwareAdapter.EntryKeyIgniteInternalTx.FinalizationStatus| Modifier and Type | Field and Description |
|---|---|
protected IgniteTxRemoteState |
txState |
cctx, concurrency, consistentIdMapper, deploymentLdrId, implicit, internal, invalidate, isDone, isolation, loc, log, mvccSnapshot, needRetVal, nodeId, onePhaseCommit, startTime, startTimeNanos, storeEnabled, subjId, taskName, taskNameHash, threadId, timeout, topVer, txNodes, txSize, writeVer, xidVer| Constructor and Description |
|---|
GridDistributedTxRemoteAdapter(GridCacheSharedContext<?,?> ctx,
UUID nodeId,
GridCacheVersion xidVer,
GridCacheVersion commitVer,
boolean sys,
byte plc,
TransactionConcurrency concurrency,
TransactionIsolation isolation,
boolean invalidate,
long timeout,
int txSize,
@Nullable UUID subjId,
int taskNameHash,
String txLbl) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activeCachesDeploymentEnabled() |
void |
activeCachesDeploymentEnabled(boolean depEnabled) |
void |
addActiveCache(GridCacheContext cacheCtx,
boolean recovery)
Adds cache to the list of active caches in transaction.
|
protected void |
addExplicit(IgniteTxEntry e)
Adds explicit version if there is one.
|
Collection<IgniteTxEntry> |
allEntries() |
Collection<GridCacheVersion> |
alternateVersions() |
void |
clearEntry(IgniteTxKey key)
Clears entry from transaction as it never happened.
|
IgniteInternalFuture<IgniteInternalTx> |
commitAsync()
Asynchronously commits this transaction by initiating
two-phase-commit process. |
void |
commitError(Throwable e) |
void |
commitRemoteTx() |
void |
doneRemote(GridCacheVersion baseVer,
Collection<GridCacheVersion> committedVers,
Collection<GridCacheVersion> rolledbackVers,
Collection<GridCacheVersion> pendingVers) |
boolean |
empty() |
IgniteTxEntry |
entry(IgniteTxKey key) |
UUID |
eventNodeId() |
void |
forceCommit()
Forces commit for this tx.
|
boolean |
hasWriteKey(IgniteTxKey key) |
void |
invalidate(boolean invalidate) |
boolean |
isStarted() |
String |
label()
Returns label of transactions.
|
boolean |
onOwnerChanged(GridCacheEntryEx entry,
GridCacheMvccCandidate owner)
Callback invoked whenever there is a lock that has been acquired
by this transaction for any of the participating entries.
|
UUID |
originatingNodeId()
Gets node ID which directly started this transaction.
|
GridTuple<CacheObject> |
peek(GridCacheContext cacheCtx,
boolean failFast,
KeyCacheObject key) |
void |
prepareRemoteTx() |
Collection<IgniteTxEntry> |
readEntries() |
Map<IgniteTxKey,IgniteTxEntry> |
readMap() |
Set<IgniteTxKey> |
readSet() |
IgniteInternalFuture<IgniteInternalTx> |
rollbackAsync()
Asynchronously rollback this transaction.
|
void |
rollbackRemoteTx() |
IgniteInternalFuture<?> |
salvageTx() |
void |
seal()
Seals transaction for updates.
|
void |
setPartitionUpdateCounters(long[] cntrs) |
String |
toString() |
IgniteTxState |
txState() |
Collection<IgniteTxEntry> |
writeEntries() |
Map<IgniteTxKey,IgniteTxEntry> |
writeMap() |
Set<IgniteTxKey> |
writeSet() |
addInvalidPartition, applyTransformClosures, applyTxSizes, batchStoreCommit, chainState, checkInternal, colocated, commitVersion, commitVersion, completedVersions, concurrency, conflictResolve, context, currentPrepareFuture, dht, done, equals, errorWhenCommitting, evictNearEntry, finalizationStatus, finishFuture, hashCode, heuristicException, implicit, implicitSingle, internal, invalidPartitions, ioPolicy, isInvalidate, isNearLocallyMapped, isolation, isRollbackOnly, isSystemInvalidate, isWriteToStoreFromDhtValid, local, localResult, log, logTxFinishErrorSafe, markFinalizing, mvccSnapshot, mvccSnapshot, near, nearXidVersion, needReturnValue, needReturnValue, needsCompletedVersions, nodeId, onePhaseCommit, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, recordStateChangedEvent, remainingTime, remote, repeatableRead, resolveTaskName, rollbackException, rollbackFuture, rollbackFuture, serializable, sessionEnd, setParentTx, setRollbackOnly, size, skipCompletedVersions, skipCompletedVersions, startTime, startTimeNanos, state, state, state, storeEnabled, storeEnabled, storeWriteThrough, subjectId, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, timeoutException, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, transactionNodes, txCounters, uncommit, updateNearCache, user, writeVersion, writeVersion, xid, xidVersionaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, removeAllMeta, removeMeta, removeMeta, replaceMetafinalize, getClass, notify, notifyAll, wait, wait, waitaddInvalidPartition, addMeta, colocated, commitVersion, commitVersion, completedVersions, concurrency, currentPrepareFuture, dht, done, errorWhenCommitting, finalizationStatus, finishFuture, implicit, implicitSingle, internal, invalidPartitions, ioPolicy, isInvalidate, isolation, isRollbackOnly, isSystemInvalidate, local, localResult, markFinalizing, masterNodeIds, meta, mvccSnapshot, mvccSnapshot, near, nearXidVersion, needsCompletedVersions, nodeId, onePhaseCommit, optimistic, optimisticLockEntries, otherNodeId, ownedVersion, ownsLock, ownsLockUnsafe, pessimistic, readCommitted, remainingTime, removeMeta, repeatableRead, serializable, setRollbackOnly, size, startTime, startTimeNanos, state, state, storeEnabled, storeWriteThrough, subjectId, system, systemInvalidate, taskNameHash, threadId, timedOut, timeout, timeout, topologyVersion, topologyVersion, topologyVersionSnapshot, transactionNodes, txCounters, user, writeVersion, writeVersion, xid, xidVersion@GridToStringInclude protected IgniteTxRemoteState txState
public GridDistributedTxRemoteAdapter(GridCacheSharedContext<?,?> ctx, UUID nodeId, GridCacheVersion xidVer, GridCacheVersion commitVer, boolean sys, byte plc, TransactionConcurrency concurrency, TransactionIsolation isolation, boolean invalidate, long timeout, int txSize, @Nullable @Nullable UUID subjId, int taskNameHash, String txLbl)
ctx - Cache registry.nodeId - Node ID.xidVer - XID version.commitVer - Commit version.sys - System flag.plc - IO policy.concurrency - Concurrency level (should be pessimistic).isolation - Transaction isolation.invalidate - Invalidate flag.timeout - Timeout.txSize - Expected transaction size.subjId - Subject ID.taskNameHash - Task name hash code.txLbl - Transaction label.public IgniteTxState txState()
txState in interface IgniteInternalTxpublic UUID eventNodeId()
eventNodeId in interface IgniteInternalTxpublic UUID originatingNodeId()
originatingNodeId in interface IgniteInternalTxpublic boolean activeCachesDeploymentEnabled()
activeCachesDeploymentEnabled in interface IgniteInternalTxtrue or false if the deployment is enabled or disabled for all active caches involved
in this transaction.public void activeCachesDeploymentEnabled(boolean depEnabled)
activeCachesDeploymentEnabled in interface IgniteInternalTxdepEnabled - Flag indicating whether deployment is enabled for caches from this transaction or not.public void addActiveCache(GridCacheContext cacheCtx, boolean recovery) throws IgniteCheckedException
addActiveCache in class IgniteTxAdaptercacheCtx - Cache context to add.recovery - Recovery flag. See CacheOperationContext.setRecovery(boolean).IgniteCheckedException - If caches already enlisted in this transaction are not compatible with given
cache (e.g. they have different stores).public boolean empty()
empty in interface IgniteInternalTxpublic void invalidate(boolean invalidate)
invalidate in interface IgniteInternalTxinvalidate in class IgniteTxAdapterinvalidate - Invalidate flag.public Map<IgniteTxKey,IgniteTxEntry> writeMap()
writeMap in interface IgniteInternalTxpublic Map<IgniteTxKey,IgniteTxEntry> readMap()
readMap in interface IgniteInternalTxpublic void seal()
seal in interface IgniteInternalTxpublic GridTuple<CacheObject> peek(GridCacheContext cacheCtx, boolean failFast, KeyCacheObject key) throws GridCacheFilterFailedException
peek in interface IgniteInternalTxcacheCtx - Cache context.failFast - Fail-fast flag.key - Key to look up.GridCacheFilterFailedException - If filter failed and failFast is true.public IgniteTxEntry entry(IgniteTxKey key)
entry in interface IgniteInternalTxkey - Key for the entry.public void clearEntry(IgniteTxKey key)
key - key to be removed.public void doneRemote(GridCacheVersion baseVer, Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers, Collection<GridCacheVersion> pendingVers) throws GridDhtInvalidPartitionException
doneRemote in interface IgniteTxRemoteExbaseVer - Base version.committedVers - Committed versions.rolledbackVers - Rolled back versions.pendingVers - Pending versions.GridDhtInvalidPartitionException - If partition was invalidated.public void setPartitionUpdateCounters(long[] cntrs)
setPartitionUpdateCounters in interface IgniteTxRemoteExcntrs - Partition update indexes.public boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)
onOwnerChanged in interface IgniteInternalTxentry - Cache entry.owner - Lock candidate that won ownership of the lock.True if transaction cared about notification.public boolean isStarted()
isStarted in class IgniteTxAdapterTrue if transaction has at least one key enlisted.public boolean hasWriteKey(IgniteTxKey key)
hasWriteKey in interface IgniteInternalTxkey - Key to check.True if key is present.public Set<IgniteTxKey> readSet()
readSet in interface IgniteInternalTxpublic Set<IgniteTxKey> writeSet()
writeSet in interface IgniteInternalTxpublic Collection<IgniteTxEntry> allEntries()
allEntries in interface IgniteInternalTxpublic Collection<IgniteTxEntry> writeEntries()
writeEntries in interface IgniteInternalTxpublic Collection<IgniteTxEntry> readEntries()
readEntries in interface IgniteInternalTxpublic final void prepareRemoteTx()
throws IgniteCheckedException
IgniteCheckedException - If failed.public final void commitRemoteTx()
throws IgniteCheckedException
commitRemoteTx in interface IgniteTxRemoteExIgniteCheckedException - If failed.public void forceCommit()
throws IgniteCheckedException
IgniteCheckedException - If commit failed.public IgniteInternalFuture<IgniteInternalTx> commitAsync()
two-phase-commit process.commitAsync in interface IgniteInternalTxpublic final IgniteInternalFuture<?> salvageTx()
salvageTx in interface IgniteInternalTxpublic final void rollbackRemoteTx()
rollbackRemoteTx in interface IgniteTxRemoteExpublic IgniteInternalFuture<IgniteInternalTx> rollbackAsync()
rollbackAsync in interface IgniteInternalTxpublic Collection<GridCacheVersion> alternateVersions()
alternateVersions in interface IgniteInternalTxpublic void commitError(Throwable e)
commitError in interface IgniteInternalTxe - Commit error.protected void addExplicit(IgniteTxEntry e)
e - Transaction entry.public String label()
label in interface IgniteInternalTxnull if there was not set.public String toString()
toString in class IgniteTxAdapter
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021