Interface Transaction


  • public interface Transaction
    Current implementation delegates all method calls to io.r2dbc.spi.Connection, but in future this API can be extended by using other SPI
    Author:
    nedis
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.reactivex.rxjava3.core.Completable commit()
      Commits the current transaction and close transactional connection.
      io.reactivex.rxjava3.core.Completable create​(SavePoint savePoint)
      Creates a save point in the current transaction.
      IsolationLevel getIsolationLevel()
      Returns the IsolationLevel for this connection.
      io.reactivex.rxjava3.core.Completable release​(SavePoint savePoint)
      Releases a save point in the current transaction.
      io.reactivex.rxjava3.core.Completable rollback()
      Rolls back the current transaction and close transactional connection.
      io.reactivex.rxjava3.core.Completable rollback​(SavePoint savePoint)
      Rolls back to a save point in the current transaction.
      io.reactivex.rxjava3.core.Completable setIsolationLevel​(IsolationLevel isolationLevel)
      Configures the isolation level for the current transaction.
    • Method Detail

      • commit

        io.reactivex.rxjava3.core.Completable commit()
        Commits the current transaction and close transactional connection.
        Returns:
        a Completable that indicates that a transaction has been committed and a connection has been closed.
      • rollback

        io.reactivex.rxjava3.core.Completable rollback()
        Rolls back the current transaction and close transactional connection.
        Returns:
        a Completable that indicates that a transaction has been rolled back and a connection has been closed.
      • create

        io.reactivex.rxjava3.core.Completable create​(SavePoint savePoint)
        Creates a save point in the current transaction.
        Parameters:
        savePoint - the save point to create
        Returns:
        a Completable that indicates that a save point has been created
        Throws:
        UnsupportedOperationException - if save points are not supported
      • release

        io.reactivex.rxjava3.core.Completable release​(SavePoint savePoint)
        Releases a save point in the current transaction. Calling this for drivers not supporting save point release results in a no-op.
        Parameters:
        savePoint - the save point to release
        Returns:
        a Completable that indicates that a save point has been released
      • rollback

        io.reactivex.rxjava3.core.Completable rollback​(SavePoint savePoint)
        Rolls back to a save point in the current transaction.
        Parameters:
        savePoint - the save point to rollback to
        Returns:
        a Completable that indicates that a save point has been rolled back to
        Throws:
        UnsupportedOperationException - if save points are not supported