Class DefaultTransactionContext
java.lang.Object
io.camunda.zeebe.db.impl.rocksdb.transaction.DefaultTransactionContext
- All Implemented Interfaces:
TransactionContext
-
Method Summary
Modifier and TypeMethodDescriptionThis will return an transaction object, on which the caller can operate on.voidrunInTransaction(TransactionOperation operations) Runs the commands like delete, put etc.
-
Method Details
-
runInTransaction
Description copied from interface:TransactionContextRuns the commands like delete, put etc. in a 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.
NOTE: It is allowed to nest these calls. The transaction will then be reused (it will run in the same transaction). If the outer call ends, the transaction will be committed. On an error the transaction is rolled back.
- Specified by:
runInTransactionin interfaceTransactionContext- Parameters:
operations- the operations
-
getCurrentTransaction
Description copied from interface:TransactionContextThis will return an transaction object, on which the caller can operate on. The caller is free to decide when to commit or rollback the transaction.- Specified by:
getCurrentTransactionin interfaceTransactionContext- Returns:
- the transaction object
-