Interface Transactional<T>

    • Method Detail

      • begin

        CompletableFuture<Version> begin​(TransactionId transactionId)
        Begins the transaction.
        Parameters:
        transactionId - the transaction identifier for the transaction to begin
        Returns:
        a completable future to be completed with the lock version
      • prepare

        CompletableFuture<Boolean> prepare​(TransactionLog<T> transactionLog)
        Prepares a transaction for commitment.
        Parameters:
        transactionLog - transaction log
        Returns:
        true if prepare is successful and transaction is ready to be committed false otherwise
      • prepareAndCommit

        CompletableFuture<Boolean> prepareAndCommit​(TransactionLog<T> transactionLog)
        Prepares and commits a transaction.
        Parameters:
        transactionLog - transaction log
        Returns:
        true if prepare is successful and transaction was committed false otherwise
      • commit

        CompletableFuture<Void> commit​(TransactionId transactionId)
        Commits a previously prepared transaction and unlocks the object.
        Parameters:
        transactionId - transaction identifier
        Returns:
        future that will be completed when the operation finishes
      • rollback

        CompletableFuture<Void> rollback​(TransactionId transactionId)
        Aborts a previously prepared transaction and unlocks the object.
        Parameters:
        transactionId - transaction identifier
        Returns:
        future that will be completed when the operation finishes