public interface DistributedTransaction extends TransactionCrudOperable
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 conflicts happened. You can retry the transaction in this
caseCommitException
- if the operation failsUnknownTransactionStatusException
- if the status of the commit is unknownvoid rollback() throws RollbackException
RollbackException
- if the operation failsdefault void abort() throws AbortException
rollback()
.AbortException
- if the operation fails