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.

See Also:
  • Transaction
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TypeArg<Transaction>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Transaction(io.vertx.sqlclient.Transaction delegate)
    Create a new instance of Transaction delegating to the given (non-null) instance of Transaction.
    Transaction(Object delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.smallrye.mutiny.Uni<Void>
    Commit the current transaction.
    void
    Commit the current transaction.
    Commit the current transaction.
    io.smallrye.mutiny.Uni<Void>
    Return the transaction completion Future that succeeds when the transaction commits and fails with TransactionRollbackException when the transaction rolls back.
    void
    Return the transaction completion Future that succeeds when the transaction commits and fails with TransactionRollbackException when the transaction rolls back.
    Return the transaction completion Future that succeeds when the transaction commits and fails with TransactionRollbackException when the transaction rolls back.
    boolean
     
    io.vertx.sqlclient.Transaction
    Get the delegate instance.
    int
     
    newInstance(io.vertx.sqlclient.Transaction delegate)
    Creates a new instance of the Transaction.
    io.smallrye.mutiny.Uni<Void>
    Rollback the transaction and release the associated resources.
    void
    Rollback the transaction and release the associated resources.
    Rollback the transaction and release the associated resources.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • Transaction

      public Transaction(io.vertx.sqlclient.Transaction delegate)
      Create a new instance of Transaction delegating to the given (non-null) instance of Transaction.
    • Transaction

      public Transaction(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.sqlclient.Transaction getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • commit

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> commit()
      Commit the current transaction.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • Transaction.commit()
    • commitAndAwait

      public void commitAndAwait()
      Commit the current transaction.

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely 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).

      See Also:
      • Transaction.commit()
    • commitAndForget

      public Transaction commitAndForget()
      Commit the current transaction.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • Transaction.commit()
    • rollback

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> rollback()
      Rollback the transaction and release the associated resources.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • Transaction.rollback()
    • rollbackAndAwait

      public void rollbackAndAwait()
      Rollback the transaction and release the associated resources.

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely 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).

      See Also:
      • Transaction.rollback()
    • rollbackAndForget

      public Transaction rollbackAndForget()
      Rollback the transaction and release the associated resources.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • Transaction.rollback()
    • completion

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> completion()
      Return the transaction completion Future that succeeds when the transaction commits and fails with TransactionRollbackException when the transaction rolls back.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • Transaction.completion()
    • completionAndAwait

      public void completionAndAwait()
      Return the transaction completion Future that succeeds when the transaction commits and fails with TransactionRollbackException when the transaction rolls back.

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely 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).

      See Also:
      • Transaction.completion()
    • completionAndForget

      public Transaction completionAndForget()
      Return the transaction completion Future that succeeds when the transaction commits and fails with TransactionRollbackException when the transaction rolls back.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • Transaction.completion()
    • newInstance

      public static Transaction newInstance(io.vertx.sqlclient.Transaction delegate)
      Creates a new instance of the Transaction.
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object