Interface Transaction

  • All Superinterfaces:
    java.lang.AutoCloseable, Graph

    public interface Transaction
    extends Graph, java.lang.AutoCloseable
    交予客户用的事务API
    • Method Detail

      • txSuccess

        void txSuccess()
        标记事务成功 标记完毕后即可调用txClose()close()提交
      • txIsSuccess

        boolean txIsSuccess()
        事务是否被标记为成功
        Returns:
        事务是否被标记为成功
      • txFailure

        void txFailure()
        标记事务失败 标记完毕后即可调用txClose()close()回滚
      • txIsOpen

        boolean txIsOpen()
        事务是否仍然存活
        Returns:
        事务是否仍然存活
      • txId

        long txId()
        事务Id
        Returns:
        事务Id
      • txIsFailure

        boolean txIsFailure()
        事务是否被标记为失败
        Returns:
        事务是否被标记为失败
      • close

        default void close()
                    throws java.lang.Exception
        等效于txClose()
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception - 关闭时发生异常