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.2
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    org.reactivestreams.Publisher<Void>
    Close the transaction.
    <T> org.reactivestreams.Publisher<T>
    Commits the transaction.
    org.reactivestreams.Publisher<Boolean>
    Determine if transaction is open.
    <T> org.reactivestreams.Publisher<T>
    Rolls back the transaction.

    Methods inherited from interface org.neo4j.driver.reactivestreams.ReactiveQueryRunner

    run, run, run, run, run
  • Method Details

    • commit

      <T> org.reactivestreams.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> org.reactivestreams.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

      org.reactivestreams.Publisher<Void> 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 Publisher that gets completed when close is successful, otherwise an error is signalled.
    • isOpen

      org.reactivestreams.Publisher<Boolean> isOpen()
      Determine if transaction is open.
      Returns:
      a publisher emitting true if transaction is open and false otherwise.