类 TransactionContextManager


  • public abstract class TransactionContextManager
    extends Object
    Delegate to register and obtain transactional contexts.

    Typically used by components that intercept or orchestrate transactional flows such as AOP interceptors or transactional operators.

    从以下版本开始:
    5.2
    作者:
    Mark Paluch
    另请参阅:
    TransactionSynchronization
    • 方法详细资料

      • createTransactionContext

        public static Function<reactor.util.context.Context,​reactor.util.context.Context> createTransactionContext()
        Create a TransactionContext and register it in the subscriber Context.
        返回:
        functional context registration.
        抛出:
        IllegalStateException - if a transaction context is already associated.
        另请参阅:
        Mono.subscriberContext(Function), Flux.subscriberContext(Function)
      • getOrCreateContextHolder

        public static Function<reactor.util.context.Context,​reactor.util.context.Context> getOrCreateContextHolder()
        Return a Function to create or associate a new TransactionContextHolder. Creation and release of transactions within a reactive flow requires a mutable holder that follows a top to down execution scheme. Reactor's subscriber context follows a down to top approach regarding mutation visibility.
        返回:
        functional context registration.