Class Transaction

java.lang.Object
io.vertx.mutiny.sqlclient.Transaction
All Implemented Interfaces:
MutinyDelegate

public class Transaction extends Object implements MutinyDelegate
A transaction.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

  • Field Details

  • Constructor Details

    • Transaction

      public Transaction(io.vertx.sqlclient.Transaction delegate)
    • Transaction

      public Transaction(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.sqlclient.Transaction getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • commit

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> commit()
      Like commit() with an handler to be notified when the transaction commit has completed

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • commitAndAwait

      public Void commitAndAwait()
      Blocking variant of commit().

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Returns:
      the Void instance produced by the operation.
    • commitAndForget

      public void commitAndForget()
      Variant of commit() that ignores the result of the operation.

      This method subscribes on the result of commit(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from commit() but you don't need to compose it with other operations.

    • rollback

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> rollback()
      Like rollback() with an handler to be notified when the transaction rollback has completed

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • rollbackAndAwait

      public Void rollbackAndAwait()
      Blocking variant of rollback().

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Returns:
      the Void instance produced by the operation.
    • rollbackAndForget

      public void rollbackAndForget()
      Variant of rollback() that ignores the result of the operation.

      This method subscribes on the result of rollback(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from rollback() but you don't need to compose it with other operations.

    • completion

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> completion()
      Like completion() but with a callback

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • completionAndAwait

      public Void completionAndAwait()
      Blocking variant of completion().

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Returns:
      the Void instance produced by the operation.
    • completionAndForget

      public void completionAndForget()
      Variant of completion() that ignores the result of the operation.

      This method subscribes on the result of completion(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from completion() but you don't need to compose it with other operations.

    • newInstance

      public static Transaction newInstance(io.vertx.sqlclient.Transaction arg)