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