Interface Transaction


public interface Transaction
The transaction.
  • Method Details

    • commit

      void commit() throws TransactionException
      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

      void rollback() throws TransactionException
      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 true if given transaction is a read-only, false otherwise.
      Returns:
      The read-only flag.