Interface ReactiveTransaction

All Superinterfaces:
ReactiveQueryRunner
All Known Implementing Classes:
InternalReactiveTransaction

public interface ReactiveTransaction extends ReactiveQueryRunner
Same as Transaction except this reactive transaction exposes a reactive API.
Since:
5.0
See Also:
  • Method Details

    • commit

      <T> Flow.Publisher<T> commit()
      Commits the transaction. It completes without publishing anything if transaction is committed successfully. Otherwise, errors when there is any error to commit.
      Type Parameters:
      T - makes it easier to be chained after other publishers.
      Returns:
      an empty publisher.
    • rollback

      <T> Flow.Publisher<T> rollback()
      Rolls back the transaction. It completes without publishing anything if transaction is rolled back successfully. Otherwise, errors when there is any error to roll back.
      Type Parameters:
      T - makes it easier to be chained after other publishers.
      Returns:
      an empty publisher.
    • close

      Close the transaction. If the transaction has been committed or rolled back, the close is optional and no operation is performed. Otherwise, the transaction will be rolled back by default by this method.
      Returns:
      new Flow.Publisher that gets completed when close is successful, otherwise an error is signalled.
    • isOpen

      Determine if transaction is open.
      Returns:
      a publisher emitting true if transaction is open and false otherwise.