public interface DistributedTransaction extends TransactionCrudOperable
TransactionCrudOperable.Scanner
Modifier and Type | Method and Description |
---|---|
default void |
abort()
Aborts a transaction.
|
void |
commit()
Commits a transaction.
|
java.lang.String |
getId()
Returns the ID of a transaction.
|
java.util.Optional<java.lang.String> |
getNamespace()
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0
|
java.util.Optional<java.lang.String> |
getTable()
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0
|
void |
rollback()
Rolls back a transaction.
|
void |
with(java.lang.String namespace,
java.lang.String tableName)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0
|
void |
withNamespace(java.lang.String namespace)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0
|
void |
withTable(java.lang.String tableName)
Deprecated.
As of release 3.6.0. Will be removed in release 5.0.0
|
java.lang.String getId()
@Deprecated void with(java.lang.String namespace, java.lang.String tableName)
namespace
- default namespace to operate fortableName
- default table name to operate for@Deprecated void withNamespace(java.lang.String namespace)
namespace
- default namespace to operate for@Deprecated java.util.Optional<java.lang.String> getNamespace()
Optional
with the namespace@Deprecated void withTable(java.lang.String tableName)
tableName
- default table name to operate for@Deprecated java.util.Optional<java.lang.String> getTable()
Optional
with the table namevoid commit() throws CommitConflictException, CommitException, UnknownTransactionStatusException
CommitConflictException
- if the transaction fails to commit due to transient faults
(e.g., a conflict error). You can retry the transaction from the beginningCommitException
- if the transaction fails to commit due to transient or nontransient
faults. You can try retrying the transaction from the beginning, but the transaction may
still fail if the cause is nontransientUnknownTransactionStatusException
- if the status of the commit is unknownvoid rollback() throws RollbackException
RollbackException
- if the transaction fails to roll back due to transient or
nontransient faultsdefault void abort() throws AbortException
rollback()
.AbortException
- if the transaction fails to abort due to transient or nontransient
faults