インタフェース TransactionManager
- すべてのスーパーインタフェース:
Manager
TransactionManagerのインタフェース。
-
メソッドの概要
修飾子とタイプメソッド説明現在のトランザクションを取得します。default <R> RdoTransaction(TransactionOption option, Function<Transaction, R> function) 指定のfunctionをoptionに従った形でトランザクション処理します。新規にトランザクションを開始する。newTransaction(boolean readOnly) 新規に読み込み専用とマークしたトランザクションを開始する。voidサスペンドされたトランザクションを復帰します。suspend()トランザクションをサスペンドします。
-
メソッドの詳細
-
newTransaction
Transaction newTransaction()新規にトランザクションを開始する。- 戻り値:
-
newTransaction
新規に読み込み専用とマークしたトランザクションを開始する。- パラメータ:
readOnly-- 戻り値:
-
suspend
Transaction suspend()トランザクションをサスペンドします。 サスペンドされた状態(Transacton.status=SUSPENDED)であることを示すTransactionインスタンスが返却されます。- 戻り値:
- サスペンド状態のTransaction
-
resume
サスペンドされたトランザクションを復帰します。- パラメータ:
t- suspend()の際取得したTransactionインスタンス
-
currentTransaction
Transaction currentTransaction()現在のトランザクションを取得します。 トランザクションが開始されていない場合、TransactionStatus.NONEのTransactionが返却されます。 サスペンドされている場合はTransactionStatus.SUSPENDEDのTransactionが返却されます。- 戻り値:
-
doTransaction
指定のfunctionをoptionに従った形でトランザクション処理します。- 型パラメータ:
R- functionのリターン値の型- パラメータ:
option- トランザクション制御オプションfunction- トランザクション処理- 戻り値:
- functionで返却されるインスタンス
-