public abstract class TransactionContextManager extends ObjectSE
通常、AOP インターセプターやトランザクションオペレーターなどのトランザクションフローをインターセプトまたは調整するコンポーネントによって使用されます。
TransactionSynchronization| 修飾子と型 | メソッドと説明 |
|---|---|
static FunctionSE<reactor.util.context.Context,reactor.util.context.Context> | createTransactionContext()TransactionContext を作成し、サブスクライバー Context に登録します。 |
static reactor.core.publisher.Mono<TransactionContext> | currentContext() サブスクライバーコンテキストまたはトランザクションコンテキストホルダーから現在の TransactionContext を取得します。 |
static FunctionSE<reactor.util.context.Context,reactor.util.context.Context> | getOrCreateContext()FunctionSE を返し、新しい TransactionContext を作成または関連付けます。 |
static FunctionSE<reactor.util.context.Context,reactor.util.context.Context> | getOrCreateContextHolder()FunctionSE を返し、新しい TransactionContextHolder を作成または関連付けます。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic static reactor.core.publisher.Mono<TransactionContext> currentContext() throws NoTransactionException
TransactionContext を取得します。コンテキストまたはコンテキストホルダーが登録されていない場合、コンテキストの取得は NoTransactionException で失敗します。TransactionContextNoTransactionException - サブスクライバーコンテキストで TransactionContext が見つからなかった場合、またはホルダーでコンテキストが見つからなかった場合 public static FunctionSE<reactor.util.context.Context,reactor.util.context.Context> createTransactionContext()
TransactionContext を作成し、サブスクライバー Context に登録します。IllegalStateExceptionSE - トランザクションコンテキストがすでに関連付けられている場合。Mono.contextWrite(Function), Flux.contextWrite(Function)public static FunctionSE<reactor.util.context.Context,reactor.util.context.Context> getOrCreateContext()
FunctionSE を返し、新しい TransactionContext を作成または関連付けます。TransactionSynchronizationManager を介したトランザクションリソースとの対話には、TransactionContext をサブスクライバーコンテキストに登録する必要があります。public static FunctionSE<reactor.util.context.Context,reactor.util.context.Context> getOrCreateContextHolder()
FunctionSE を返し、新しい TransactionContextHolder を作成または関連付けます。リアクティブフロー内でトランザクションを作成および解放するには、トップツーダウンの実行スキームに従う可変ホルダーが必要です。Reactor のサブスクライバーコンテキストは、ミューテーションの可視性に関するトップツーアプローチに従います。