com.holonplatform.datastore.mongo.reactor.tx

## Interface ReactiveMongoTransaction

- All Superinterfaces:
    MongoTransaction<com.mongodb.reactivestreams.client.ClientSession>, com.holonplatform.reactor.datastore.transaction.ReactiveTransaction, com.holonplatform.core.datastore.transaction.TransactionStatus

      public interface ReactiveMongoTransaction
      extends MongoTransaction<com.mongodb.reactivestreams.client.ClientSession>, com.holonplatform.reactor.datastore.transaction.ReactiveTransaction

  Reactive MongoDB `Transaction`.
  Since:
    5.2.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.datastore.transaction.TransactionStatus

      `com.holonplatform.core.datastore.transaction.TransactionStatus.IllegalTransactionStatusException, com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException, com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionNotSupportedException`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ReactiveMongoTransaction` | `create(com.mongodb.reactivestreams.client.ClientSession session, com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)` Create a new `ReactiveMongoTransaction`.
    `static ReactiveMongoTransaction` | `delegate(ReactiveMongoTransaction delegated)` Create a `ReactiveMongoTransaction` which delegates its operations and status to the given delegated transaction.
    `reactor.core.publisher.Mono<Void>` | `end()` Finalize the transaction.
    `void` | `start()` Start the transaction.

    - ### Methods inherited from interface com.holonplatform.datastore.mongo.core.tx.MongoTransaction

      `getConfiguration, getSession`

    - ### Methods inherited from interface com.holonplatform.reactor.datastore.transaction.ReactiveTransaction

      `commit, rollback`

    - ### Methods inherited from interface com.holonplatform.core.datastore.transaction.TransactionStatus

      `isActive, isCompleted, isNew, isRollbackOnly, setRollbackOnly`

- - ### Method Detail

    - #### start

          void start()
              throws com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException

      Start the transaction.
      Throws:
        `TransactionException` - If an error occurred
        `com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException`

    - #### end

          reactor.core.publisher.Mono<Void> end()
                                         throws com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException

      Finalize the transaction.
      Returns:
        A `Mono` to handle the transaction end
      Throws:
        `TransactionException` - If an error occurred
        `com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException`

    - #### create

          static ReactiveMongoTransaction create(com.mongodb.reactivestreams.client.ClientSession session,
                                                 com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)

      Create a new `ReactiveMongoTransaction`.
      Parameters:
        `session` - Client session (not null)
        `configuration` - Transaction configuration (not null)
      Returns:
        A new `ReactiveMongoTransaction` implementation

    - #### delegate

          static ReactiveMongoTransaction delegate(ReactiveMongoTransaction delegated)

      Create a `ReactiveMongoTransaction` which delegates its operations and status to the given delegated transaction.

      The delegated transaction returns `false` from the `TransactionStatus.isNew()` method.

      Parameters:
        `delegated` - Delegated transaction (not null)
      Returns:
        A delegated `ReactiveMongoTransaction` implementation

Copyright © 2019 The Holon Platform. All rights reserved.