Package io.camunda.zeebe.db
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 TypeMethodDescriptionvoidcommit()Commits the transaction and writes the data into the database.voidrollback()Rolls the transaction back to the latest commit, discards all changes in between.voidrun(TransactionOperation operations) Runs the commands like delete, put etc.
-
Method Details
-
run
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 layerRuntimeException- is thrown on an unexpected error in executing the operationsException
-
commit
Commits the transaction and writes the data into the database.- Throws:
ZeebeDbException- if the underlying database has a recoverable exception thrownException- if the underlying database has a non recoverable exception thrown
-
rollback
Rolls the transaction back to the latest commit, discards all changes in between.- Throws:
ZeebeDbException- if the underlying database has a recoverable exception thrownException- if the underlying database has a non recoverable exception thrown
-