インタフェース TransactionManager

すべてのスーパーインタフェース:
Manager

public interface TransactionManager
extends Manager
TransactionManagerのインタフェース。
  • メソッドの概要

    修飾子とタイプ メソッド 説明
    Transaction currentTransaction()
    現在のトランザクションを取得します。
    default <R> R doTransaction​(TransactionOption option, java.util.function.Function<Transaction,​R> function)
    指定のfunctionをoptionに従った形でトランザクション処理します。
    Transaction newTransaction()
    新規にトランザクションを開始する。
    Transaction newTransaction​(boolean readOnly)
    新規に読み込み専用とマークしたトランザクションを開始する。
    void resume​(Transaction t)
    サスペンドされたトランザクションを復帰します。
    Transaction suspend()
    トランザクションをサスペンドします。
  • メソッドの詳細

    • newTransaction

      Transaction newTransaction()
      新規にトランザクションを開始する。
      戻り値:
    • newTransaction

      Transaction newTransaction​(boolean readOnly)
      新規に読み込み専用とマークしたトランザクションを開始する。
      パラメータ:
      readOnly -
      戻り値:
    • suspend

      Transaction suspend()
      トランザクションをサスペンドします。 サスペンドされた状態(Transacton.status=SUSPENDED)であることを示すTransactionインスタンスが返却されます。
      戻り値:
      サスペンド状態のTransaction
    • resume

      void resume​(Transaction t)
      サスペンドされたトランザクションを復帰します。
      パラメータ:
      t - suspend()の際取得したTransactionインスタンス
    • currentTransaction

      Transaction currentTransaction()
      現在のトランザクションを取得します。 トランザクションが開始されていない場合、TransactionStatus.NONEのTransactionが返却されます。 サスペンドされている場合はTransactionStatus.SUSPENDEDのTransactionが返却されます。
      戻り値:
    • doTransaction

      default <R> R doTransaction​(TransactionOption option, java.util.function.Function<Transaction,​R> function)
      指定のfunctionをoptionに従った形でトランザクション処理します。
      型パラメータ:
      R - functionのリターン値の型
      パラメータ:
      option - トランザクション制御オプション
      function - トランザクション処理
      戻り値:
      functionで返却されるインスタンス