Interface Transaction

  • All Superinterfaces:
    MessageProducer
    All Known Implementing Classes:
    AbstractTransaction

    public interface Transaction
    extends MessageProducer
    Represent an asychronous transaction. It can be used to call requests inside a transaction boundary, commit the transaction or rollback it.
    • Method Detail

      • commit

        org.joo.promise4j.Promise<io.gridgo.framework.support.Message,​java.lang.Exception> commit()
        Commit the transaction and close the underlying connection. This method should be idempotent, i.e calling multiple times has the same effect as calling once.
        Returns:
        the transaction itself
      • rollback

        org.joo.promise4j.Promise<io.gridgo.framework.support.Message,​java.lang.Exception> rollback()
        Rollback the transaction and close the underlying connection. This method should be idempotent, i.e calling multiple times has the same effect as calling once. Calling this method after commit() is called has no effect.
        Returns:
        the transaction itself