com.holonplatform.core.datastore.transaction

## Interface Transactional

-     public interface Transactional

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

- - ### Method Summary

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

- - ### Method Detail

    - #### withTransaction

          <R> R withTransaction(TransactionalOperation<R> operation,
                                TransactionConfiguration transactionConfiguration)

      Execute given operation within a transaction and return a result. A `Transaction` 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:
        The operation result

    - #### withTransaction

          default <R> R withTransaction(TransactionalOperation<R> operation)

      Execute given operation within a transaction and return a result. A `Transaction` reference is provided to perform `commit` and `rollback` operations.
      Type Parameters:
        `R` - Operation result type
      Parameters:
        `operation` - Operation to execute (not null)
      Returns:
        The operation result

    - #### withTransaction

          default void withTransaction(TransactionalOperation.TransactionalInvocation operation,
                                       TransactionConfiguration transactionConfiguration)

      Execute given operation within a transaction. A `Transaction` reference is provided to perform `commit` and `rollback` operations.
      Parameters:
        `operation` - Operation to execute (not null)
        `transactionConfiguration` - Transaction configuration

    - #### withTransaction

          default void withTransaction(TransactionalOperation.TransactionalInvocation operation)

      Execute given operation within a transaction. A `Transaction` reference is provided to perform `commit` and `rollback` operations.
      Parameters:
        `operation` - Operation to execute (not null)

Copyright © 2019 The Holon Platform. All rights reserved.