com.holonplatform.async.datastore.transaction

## Interface AsyncTransactional

-     public interface AsyncTransactional

  Represents an object which is capable to manage asynchronous transactions, providing methods to execute an operation transactionally and using `AsyncTransaction` as transaction handler.
  Since:
    5.2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default <R> CompletionStage<R>` | `withTransaction(AsyncTransactionalOperation<R> operation)` Execute given operation within a transaction and return a result.
    `<R> CompletionStage<R>` | `withTransaction(AsyncTransactionalOperation<R> operation, TransactionConfiguration transactionConfiguration)` Execute given operation within a transaction and return a result.

- - ### Method Detail

    - #### withTransaction

          <R> CompletionStage<R> withTransaction(AsyncTransactionalOperation<R> operation,
                                                 TransactionConfiguration transactionConfiguration)

      Execute given operation within a transaction and return a result. An `AsyncTransaction` reference is provided to perform `commit` and `rollback` operations.
      Type Parameters:
        `R` - Operation result type
      Parameters:
        `operation` - Operation to execute (not null)
        `transactionConfiguration` - Transaction configuration
      Returns:
        A `CompletionStage` which can be used to handle the asynchronous operation outcome and the operation result

    - #### withTransaction

          default <R> CompletionStage<R> withTransaction(AsyncTransactionalOperation<R> operation)

      Execute given operation within a transaction and return a result. An `AsyncTransaction` reference is provided to perform `commit` and `rollback` operations.
      Type Parameters:
        `R` - Operation result type
      Parameters:
        `operation` - Operation to execute (not null)
      Returns:
        A `CompletionStage` which can be used to handle the asynchronous operation outcome and the operation result

Copyright © 2019 The Holon Platform. All rights reserved.