Class RemoteReadOnlyTransaction
java.lang.Object
org.apache.ignite.client.handler.requests.tx.RemoteReadOnlyTransaction
- All Implemented Interfaces:
org.apache.ignite.internal.tx.InternalTransaction,org.apache.ignite.table.InternalTransactionBase,org.apache.ignite.tx.Transaction
public class RemoteReadOnlyTransaction
extends Object
implements org.apache.ignite.internal.tx.InternalTransaction
Read-only transaction view reconstructed from the attributes a request carried (see
ClientTxUtils.TX_ID_RO_ATTRIBUTES): id, coordinator id, and read timestamp. The transaction itself is
coordinated on another node; this view lets the local node serve reads at the transaction's snapshot - locking the
node-local low watermark under the real transaction's id, exactly as a read routed through the coordinator would -
without owning the transaction's lifecycle. Every lifecycle operation therefore throws.-
Field Summary
Fields inherited from interface org.apache.ignite.internal.tx.InternalTransaction
USE_CONFIGURED_TIMEOUT_DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionRemoteReadOnlyTransaction(UUID txId, UUID coordinatorId, org.apache.ignite.internal.hlc.HybridTimestamp readTimestamp) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanassignCommitPartition(org.apache.ignite.internal.replicator.ZonePartitionId commitPartitionId) voidcommit()org.apache.ignite.internal.replicator.ZonePartitionIdvoidenlist(org.apache.ignite.internal.replicator.ZonePartitionId replicationGroupId, int tableId, String primaryNodeConsistentId, long consistencyToken) org.apache.ignite.internal.tx.PendingTxPartitionEnlistmentenlistedPartition(org.apache.ignite.internal.replicator.ZonePartitionId replicationGroupId) enlistStore(org.apache.ignite.cache.CacheStore<?, ?> store) booleanexternal()voidexternal(boolean external) finish(boolean commitIntent, org.apache.ignite.internal.hlc.HybridTimestamp executionTimestamp, boolean full, @Nullable Throwable finishReason) longid()booleanimplicit()booleanbooleanbooleankill()voidprocessDelayedAck(Object val, @Nullable Throwable err) org.apache.ignite.internal.hlc.HybridTimestampbooleanremote()voidrollback()rollbackWithExceptionAsync(Throwable throwable) org.apache.ignite.internal.hlc.HybridTimestamp@Nullable org.apache.ignite.internal.tx.TxStatestate()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.ignite.internal.tx.InternalTransaction
enlistFailedException, remoteOnCoordinatorMethods inherited from interface org.apache.ignite.table.InternalTransactionBase
readTimestampLong
-
Constructor Details
-
RemoteReadOnlyTransaction
public RemoteReadOnlyTransaction(UUID txId, UUID coordinatorId, org.apache.ignite.internal.hlc.HybridTimestamp readTimestamp) Constructor.- Parameters:
txId- Transaction id.coordinatorId- Id of the node coordinating the transaction.readTimestamp- Timestamp the transaction reads at.
-
-
Method Details
-
id
- Specified by:
idin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
coordinatorId
- Specified by:
coordinatorIdin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
readTimestamp
public org.apache.ignite.internal.hlc.HybridTimestamp readTimestamp()- Specified by:
readTimestampin interfaceorg.apache.ignite.table.InternalTransactionBase
-
schemaTimestamp
public org.apache.ignite.internal.hlc.HybridTimestamp schemaTimestamp()- Specified by:
schemaTimestampin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnlyin interfaceorg.apache.ignite.tx.Transaction
-
implicit
public boolean implicit()- Specified by:
implicitin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
remote
public boolean remote()- Specified by:
remotein interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
external
public boolean external()- Specified by:
externalin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
external
public void external(boolean external) - Specified by:
externalin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
state
@Nullable public @Nullable org.apache.ignite.internal.tx.TxState state()- Specified by:
statein interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
getTimeout
public long getTimeout()- Specified by:
getTimeoutin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
isRolledBackWithTimeoutExceeded
public boolean isRolledBackWithTimeoutExceeded()- Specified by:
isRolledBackWithTimeoutExceededin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
isFinishingOrFinished
public boolean isFinishingOrFinished()- Specified by:
isFinishingOrFinishedin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
processDelayedAck
- Specified by:
processDelayedAckin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
enlist
public void enlist(org.apache.ignite.internal.replicator.ZonePartitionId replicationGroupId, int tableId, String primaryNodeConsistentId, long consistencyToken) - Specified by:
enlistin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
enlistedPartition
public org.apache.ignite.internal.tx.PendingTxPartitionEnlistment enlistedPartition(org.apache.ignite.internal.replicator.ZonePartitionId replicationGroupId) - Specified by:
enlistedPartitionin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
assignCommitPartition
public boolean assignCommitPartition(org.apache.ignite.internal.replicator.ZonePartitionId commitPartitionId) - Specified by:
assignCommitPartitionin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
commitPartition
public org.apache.ignite.internal.replicator.ZonePartitionId commitPartition()- Specified by:
commitPartitionin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
commitAsync
- Specified by:
commitAsyncin interfaceorg.apache.ignite.tx.Transaction
-
rollbackAsync
- Specified by:
rollbackAsyncin interfaceorg.apache.ignite.tx.Transaction
-
rollbackWithExceptionAsync
- Specified by:
rollbackWithExceptionAsyncin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
finish
public CompletableFuture<Void> finish(boolean commitIntent, org.apache.ignite.internal.hlc.HybridTimestamp executionTimestamp, boolean full, @Nullable @Nullable Throwable finishReason) - Specified by:
finishin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
kill
- Specified by:
killin interfaceorg.apache.ignite.internal.tx.InternalTransaction
-
commit
public void commit() throws org.apache.ignite.tx.TransactionException- Specified by:
commitin interfaceorg.apache.ignite.tx.Transaction- Throws:
org.apache.ignite.tx.TransactionException
-
rollback
public void rollback() throws org.apache.ignite.tx.TransactionException- Specified by:
rollbackin interfaceorg.apache.ignite.tx.Transaction- Throws:
org.apache.ignite.tx.TransactionException
-
enlistStore
- Specified by:
enlistStorein interfaceorg.apache.ignite.internal.tx.InternalTransaction
-