public interface Transactional<T>
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Version> |
begin(TransactionId transactionId)
Begins the transaction.
|
CompletableFuture<Void> |
commit(TransactionId transactionId)
Commits a previously prepared transaction and unlocks the object.
|
CompletableFuture<Boolean> |
prepare(TransactionLog<T> transactionLog)
Prepares a transaction for commitment.
|
CompletableFuture<Boolean> |
prepareAndCommit(TransactionLog<T> transactionLog)
Prepares and commits a transaction.
|
CompletableFuture<Void> |
rollback(TransactionId transactionId)
Aborts a previously prepared transaction and unlocks the object.
|
CompletableFuture<Version> begin(TransactionId transactionId)
transactionId - the transaction identifier for the transaction to beginCompletableFuture<Boolean> prepare(TransactionLog<T> transactionLog)
transactionLog - transaction logtrue if prepare is successful and transaction is ready to be committed
false otherwiseCompletableFuture<Boolean> prepareAndCommit(TransactionLog<T> transactionLog)
transactionLog - transaction logtrue if prepare is successful and transaction was committed
false otherwiseCompletableFuture<Void> commit(TransactionId transactionId)
transactionId - transaction identifierCompletableFuture<Void> rollback(TransactionId transactionId)
transactionId - transaction identifier