Package org.apache.ignite.tx
Interface Transaction
public interface Transaction
The transaction.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()Synchronously commits a transaction.Asynchronously commits a transaction.booleanReturns {code true} if given transaction is a read-only,falseotherwise.voidrollback()Synchronously rolls back a transaction.Asynchronously rolls back a transaction.
-
Method Details
-
commit
Synchronously commits a transaction. A commit of a completed or ending transaction has no effect and always succeeds when the transaction is completed.- Throws:
TransactionException- If a transaction can't be committed.
-
commitAsync
CompletableFuture<Void> commitAsync()Asynchronously commits a transaction. A commit of a completed or ending transaction has no effect and always succeeds when the transaction is completed.- Returns:
- The future.
-
rollback
Synchronously rolls back a transaction. A rollback of a completed or ending transaction has no effect and always succeeds when the transaction is completed.- Throws:
TransactionException- If a transaction can't be rolled back.
-
rollbackAsync
CompletableFuture<Void> rollbackAsync()Asynchronously rolls back a transaction. A rollback of a completed or ending transaction has no effect and always succeeds when the transaction is completed.- Returns:
- The future.
-
isReadOnly
boolean isReadOnly()Returns {code true} if given transaction is a read-only,falseotherwise.- Returns:
- {code true} if given transaction is a read-only,
falseotherwise.
-