public interface IgniteInternalTx
'Ex' stands for external).| Modifier and Type | Interface and Description |
|---|---|
static class |
IgniteInternalTx.FinalizationStatus |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activeCachesDeploymentEnabled() |
void |
activeCachesDeploymentEnabled(boolean depEnabled) |
void |
addInvalidPartition(int cacheId,
int part) |
<T> T |
addMeta(int key,
T val)
Adds a new metadata.
|
Collection<IgniteTxEntry> |
allEntries() |
Collection<GridCacheVersion> |
alternateVersions() |
boolean |
colocated() |
IgniteInternalFuture<IgniteInternalTx> |
commitAsync()
Asynchronously commits this transaction by initiating
two-phase-commit process. |
void |
commitError(Throwable e) |
GridCacheVersion |
commitVersion() |
void |
commitVersion(GridCacheVersion commitVer) |
void |
completedVersions(GridCacheVersion base,
Collection<GridCacheVersion> committed,
Collection<GridCacheVersion> rolledback) |
TransactionConcurrency |
concurrency()
Cache transaction concurrency mode.
|
@Nullable IgniteInternalFuture<?> |
currentPrepareFuture() |
boolean |
dht() |
boolean |
done() |
boolean |
empty() |
@Nullable IgniteTxEntry |
entry(IgniteTxKey key) |
void |
errorWhenCommitting()
Changes transaction state from COMMITTING to MARKED_ROLLBACK.
|
UUID |
eventNodeId() |
@Nullable IgniteInternalTx.FinalizationStatus |
finalizationStatus() |
IgniteInternalFuture<IgniteInternalTx> |
finishFuture() |
boolean |
hasWriteKey(IgniteTxKey key) |
boolean |
implicit()
Flag indicating whether transaction was started automatically by the
system or not.
|
boolean |
implicitSingle() |
@Nullable UUID |
incrementalSnapshotId() |
void |
incrementalSnapshotId(@Nullable UUID id) |
boolean |
internal() |
void |
invalidate(boolean invalidate) |
Map<Integer,Set<Integer>> |
invalidPartitions() |
byte |
ioPolicy() |
boolean |
isInvalidate()
Get invalidation flag for this transaction.
|
TransactionIsolation |
isolation()
Cache transaction isolation level.
|
boolean |
isRollbackOnly()
If transaction was marked as rollback-only.
|
boolean |
isSystemInvalidate() |
@Nullable String |
label()
Returns label of transactions.
|
boolean |
local() |
boolean |
localResult() |
boolean |
markFinalizing(IgniteInternalTx.FinalizationStatus status) |
Collection<UUID> |
masterNodeIds() |
<T> T |
meta(int key)
Gets metadata by key.
|
MvccSnapshot |
mvccSnapshot() |
void |
mvccSnapshot(MvccSnapshot mvccSnapshot) |
boolean |
near() |
@Nullable GridCacheVersion |
nearXidVersion() |
boolean |
needsCompletedVersions() |
UUID |
nodeId()
ID of the node on which this transaction started.
|
boolean |
onePhaseCommit() |
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.
|
boolean |
optimistic() |
Collection<IgniteTxEntry> |
optimisticLockEntries()
Gets a list of entries that needs to be locked on the next step of prepare stage of
optimistic transaction.
|
UUID |
originatingNodeId()
Gets node ID which directly started this transaction.
|
@Nullable UUID |
otherNodeId()
Gets ID of additional node involved.
|
@Nullable GridCacheVersion |
ownedVersion(IgniteTxKey key)
Gets owned version for near remote transaction.
|
boolean |
ownsLock(GridCacheEntryEx entry) |
boolean |
ownsLockUnsafe(GridCacheEntryEx entry) |
@Nullable GridTuple<CacheObject> |
peek(GridCacheContext ctx,
boolean failFast,
KeyCacheObject key) |
boolean |
pessimistic() |
boolean |
readCommitted() |
Collection<IgniteTxEntry> |
readEntries() |
Map<IgniteTxKey,IgniteTxEntry> |
readMap() |
Set<IgniteTxKey> |
readSet() |
long |
remainingTime()
Gets allowed remaining time for this transaction.
|
<T> T |
removeMeta(int key)
Removes metadata by key.
|
boolean |
repeatableRead() |
IgniteInternalFuture<IgniteInternalTx> |
rollbackAsync()
Asynchronously rollback this transaction.
|
@Nullable IgniteInternalFuture<?> |
salvageTx() |
void |
seal()
Seals transaction for updates.
|
boolean |
serializable() |
boolean |
setRollbackOnly()
Modify the transaction associated with the current thread such that the
only possible outcome of the transaction is to roll back the
transaction.
|
int |
size() |
long |
startTime()
Start time of this transaction.
|
long |
startTimeNanos()
Start time of this transaction in nanoseconds to measure duration.
|
TransactionState |
state()
Gets current transaction state value.
|
boolean |
state(TransactionState state) |
boolean |
storeEnabled() |
boolean |
storeWriteThrough() |
UUID |
subjectId() |
boolean |
system()
Checks if this is system cache transaction.
|
void |
systemInvalidate(boolean sysInvalidate) |
int |
taskNameHash()
Task name hash in case if transaction was initiated within task execution.
|
long |
threadId()
ID of the thread in which this transaction started.
|
boolean |
timedOut() |
long |
timeout()
Gets timeout value in milliseconds for this transaction.
|
long |
timeout(long timeout)
Sets transaction timeout value.
|
AffinityTopologyVersion |
topologyVersion() |
AffinityTopologyVersion |
topologyVersion(AffinityTopologyVersion topVer)
Attempts to set topology version and returns the current value.
|
AffinityTopologyVersion |
topologyVersionSnapshot() |
@Nullable Map<UUID,Collection<UUID>> |
transactionNodes() |
@Nullable TxCounters |
txCounters(boolean createIfAbsent) |
IgniteTxState |
txState() |
boolean |
user() |
Collection<IgniteTxEntry> |
writeEntries() |
Map<IgniteTxKey,IgniteTxEntry> |
writeMap() |
Set<IgniteTxKey> |
writeSet() |
GridCacheVersion |
writeVersion() |
void |
writeVersion(GridCacheVersion ver)
Sets write version.
|
IgniteUuid |
xid()
Gets unique identifier for this transaction.
|
GridCacheVersion |
xidVersion() |
boolean localResult()
True if transaction started on the node initiated cache operation.IgniteUuid xid()
UUID nodeId()
long threadId()
long startTime()
long startTimeNanos()
TransactionIsolation isolation()
TransactionConcurrency concurrency()
boolean implicit()
put(..) or remove(..) operation is invoked
outside of transaction.True if transaction was started implicitly.boolean isInvalidate()
true, then
remote values will be invalidated (set to null) instead
of updated.
Invalidation messages don't carry new values, so they are a lot lighter than update messages. However, when a value is accessed on a node after it's been invalidated, it must be loaded from persistent store.
TransactionState state()
long timeout()
IgniteTxTimeoutCheckedException will be thrown.long timeout(long timeout)
timeout - Transaction timeout value.void errorWhenCommitting()
boolean setRollbackOnly()
True if rollback-only flag was set as a result of this operation,
false if it was already set prior to this call or could not be set
because transaction is already finishing up committing or rolling back.boolean isRollbackOnly()
True if transaction can only be rolled back.@Nullable <T> T removeMeta(int key)
T - Type of the value.key - Key of the metadata to remove.null.@Nullable <T> T meta(int key)
T - Type of the value.key - Metadata key.null.@Nullable
<T> T addMeta(int key,
T val)
T - Type of the value.key - Metadata key.val - Metadata value.null if there was none.int size()
boolean storeEnabled()
True if transaction is allowed to use store.boolean storeWriteThrough()
True if transaction is allowed to use store and transactions spans one or more caches with
store enabled.boolean system()
True if transaction is started for system cache.byte ioPolicy()
AffinityTopologyVersion topologyVersion()
AffinityTopologyVersion topologyVersionSnapshot()
boolean implicitSingle()
IgniteTxState txState()
boolean activeCachesDeploymentEnabled()
true or false if the deployment is enabled or disabled for all active caches involved
in this transaction.void activeCachesDeploymentEnabled(boolean depEnabled)
depEnabled - Flag indicating whether deployment is enabled for caches from this transaction or not.AffinityTopologyVersion topologyVersion(AffinityTopologyVersion topVer)
topVer - Topology version.boolean empty()
True if transaction is empty.boolean markFinalizing(IgniteInternalTx.FinalizationStatus status)
status - Finalization status to set.True if could mark was set.@Nullable @Nullable IgniteInternalTx.FinalizationStatus finalizationStatus()
void addInvalidPartition(int cacheId,
int part)
cacheId - Cache id.part - Invalid partition.@Nullable @Nullable GridCacheVersion ownedVersion(IgniteTxKey key)
key - Key to get version for.@Nullable @Nullable UUID otherNodeId()
UUID eventNodeId()
UUID originatingNodeId()
Collection<UUID> masterNodeIds()
@Nullable @Nullable GridCacheVersion nearXidVersion()
@Nullable @Nullable Map<UUID,Collection<UUID>> transactionNodes()
boolean ownsLock(GridCacheEntryEx entry) throws GridCacheEntryRemovedException
entry - Entry to check.True if lock is owned.GridCacheEntryRemovedException - If entry has been removed.boolean ownsLockUnsafe(GridCacheEntryEx entry)
entry - Entry to check.True if lock is owned.boolean near()
True if near transaction.boolean dht()
True if DHT transaction.boolean colocated()
True if dht colocated transaction.boolean local()
True if transaction is local, false if it's remote.UUID subjectId()
int taskNameHash()
boolean user()
True if transaction is user transaction, which means:
boolean hasWriteKey(IgniteTxKey key)
key - Key to check.True if key is present.Set<IgniteTxKey> readSet()
Set<IgniteTxKey> writeSet()
Collection<IgniteTxEntry> allEntries()
Collection<IgniteTxEntry> writeEntries()
Collection<IgniteTxEntry> readEntries()
Map<IgniteTxKey,IgniteTxEntry> writeMap()
Map<IgniteTxKey,IgniteTxEntry> readMap()
Collection<IgniteTxEntry> optimisticLockEntries()
void seal()
@Nullable @Nullable IgniteTxEntry entry(IgniteTxKey key)
key - Key for the entry.@Nullable @Nullable GridTuple<CacheObject> peek(GridCacheContext ctx, boolean failFast, KeyCacheObject key) throws GridCacheFilterFailedException
ctx - Cache context.failFast - Fail-fast flag.key - Key to look up.GridCacheFilterFailedException - If filter failed and failFast is true.GridCacheVersion xidVersion()
GridCacheVersion commitVersion()
void commitVersion(GridCacheVersion commitVer)
commitVer - Commit version.@Nullable @Nullable IgniteInternalFuture<?> salvageTx()
GridCacheVersion writeVersion()
xidVersion().void writeVersion(GridCacheVersion ver)
ver - Write version.IgniteInternalFuture<IgniteInternalTx> finishFuture()
@Nullable @Nullable IgniteInternalFuture<?> currentPrepareFuture()
boolean state(TransactionState state)
state - Transaction state.True if transition was valid, false otherwise.void invalidate(boolean invalidate)
invalidate - Invalidate flag.void systemInvalidate(boolean sysInvalidate)
sysInvalidate - System invalidate flag.boolean isSystemInvalidate()
IgniteInternalFuture<IgniteInternalTx> rollbackAsync()
IgniteInternalFuture<IgniteInternalTx> commitAsync()
two-phase-commit process.boolean onOwnerChanged(GridCacheEntryEx entry, GridCacheMvccCandidate owner)
entry - Cache entry.owner - Lock candidate that won ownership of the lock.True if transaction cared about notification.boolean timedOut()
True if transaction timed out.boolean done()
True if transaction had completed successfully or unsuccessfully.boolean optimistic()
True for OPTIMISTIC transactions.boolean pessimistic()
True for PESSIMISTIC transactions.boolean readCommitted()
True if read-committed.boolean repeatableRead()
True if repeatable-read.boolean serializable()
True if serializable.long remainingTime()
throws IgniteTxTimeoutCheckedException
IgniteTxTimeoutCheckedException - If transaction timed out.Collection<GridCacheVersion> alternateVersions()
boolean needsCompletedVersions()
True if transaction needs completed versions for processing.void completedVersions(GridCacheVersion base, Collection<GridCacheVersion> committed, Collection<GridCacheVersion> rolledback)
base - Base for committed versions.committed - Committed transactions relative to base.rolledback - Rolled back transactions relative to base.boolean internal()
True if transaction has at least one internal entry.boolean onePhaseCommit()
True if transaction is a one-phase-commit transaction.void commitError(Throwable e)
e - Commit error.@Nullable @Nullable String label()
null if there was not set.void mvccSnapshot(MvccSnapshot mvccSnapshot)
mvccSnapshot - Mvcc snapshot.MvccSnapshot mvccSnapshot()
@Nullable @Nullable UUID incrementalSnapshotId()
null if snapshot isn't running.void incrementalSnapshotId(@Nullable
@Nullable UUID id)
id - ID of incremental snapshot after which this transaction commits, null if snapshot isn't running.@Nullable @Contract(value="true -> !null;") @Nullable TxCounters txCounters(boolean createIfAbsent)
createIfAbsent - True if non-null instance is needed.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023