Interface ZeebeDbTransaction

All Known Implementing Classes:
ZeebeTransaction

public interface ZeebeDbTransaction
Represents an Zeebe DB transaction, which can be committed or on error it can be rolled back.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Commits the transaction and writes the data into the database.
    void
    Rolls the transaction back to the latest commit, discards all changes in between.
    void
    Runs the commands like delete, put etc.
  • Method Details

    • run

      void run(TransactionOperation operations) throws Exception
      Runs the commands like delete, put etc. in the current transaction. Access of different column families inside this transaction are possible.

      Reading key-value pairs via get or an iterator is also possible and will reflect changes, which are made during the transaction.

      Parameters:
      operations - the operations
      Throws:
      ZeebeDbException - is thrown on an unexpected error in the database layer
      RuntimeException - is thrown on an unexpected error in executing the operations
      Exception
    • commit

      void commit() throws Exception
      Commits the transaction and writes the data into the database.
      Throws:
      ZeebeDbException - if the underlying database has a recoverable exception thrown
      Exception - if the underlying database has a non recoverable exception thrown
    • rollback

      void rollback() throws Exception
      Rolls the transaction back to the latest commit, discards all changes in between.
      Throws:
      ZeebeDbException - if the underlying database has a recoverable exception thrown
      Exception - if the underlying database has a non recoverable exception thrown