Interface DaxConn


public interface DaxConn
DaxConn is the interface that represents a connection to a data store. This interface declares methods: commit(com.github.sttk.sabi.AsyncGroup), rollback(com.github.sttk.sabi.AsyncGroup) and close() to work in a transaction process. commit(com.github.sttk.sabi.AsyncGroup) is the method for comming updates in a transaction. rollback(com.github.sttk.sabi.AsyncGroup) is the method for rollback updates in a transaction. If commiting and rollbacking procedures are asynchronous, the argument AsyncGroup(s) are used to process them. close() is the method to close this connection.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this connection.
    void
    Commits updates to a target data store in a transaction.
    void
    Reverts updates forcely even if updates are already commited or this connection does not have rollback mechanism.
    default boolean
    Checks whether updates are already committed.
    default void
    Rollbacks updates to a target data store in a transaction.
  • Method Details

    • commit

      void commit(AsyncGroup ag) throws Err
      Commits updates to a target data store in a transaction. If the commit procedure is asynchronous, it is processed with an argument AsyncGroup object.
      Parameters:
      ag - An AsyncGroup object which is used if this commit procedure is asynchronous.
      Throws:
      Err - If commiting updates fails.
    • isCommitted

      default boolean isCommitted()
      Checks whether updates are already committed.
      Returns:
      true if committed, or no rollback mechanism.
    • rollback

      default void rollback(AsyncGroup ag)
      Rollbacks updates to a target data store in a transaction. If the rollback procedure is asynchronous, it is processed with an argument AsyncGroup object.
      Parameters:
      ag - An AsyncGroup object which is used if this rollback procedure is asynchronous.
    • forceBack

      void forceBack(AsyncGroup ag)
      Reverts updates forcely even if updates are already commited or this connection does not have rollback mechanism.
      Parameters:
      ag - An AsyncGroup object which is used if this rollback procedure is asynchronous.
    • close

      void close()
      Closes this connection.