Module dev.openfeature.sdk
Package dev.openfeature.sdk
Class ThreadLocalTransactionContextPropagator
java.lang.Object
dev.openfeature.sdk.ThreadLocalTransactionContextPropagator
- All Implemented Interfaces:
TransactionContextPropagator
public class ThreadLocalTransactionContextPropagator
extends Object
implements TransactionContextPropagator
A
ThreadLocalTransactionContextPropagator is a transactional context propagator
that uses a ThreadLocal to persist a transactional context for the duration of a single thread.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the currently defined transaction context using the registered transaction context propagator.voidsetTransactionContext(EvaluationContext evaluationContext) Sets the transaction context.
-
Constructor Details
-
ThreadLocalTransactionContextPropagator
public ThreadLocalTransactionContextPropagator()
-
-
Method Details
-
getTransactionContext
Returns the currently defined transaction context using the registered transaction context propagator.- Specified by:
getTransactionContextin interfaceTransactionContextPropagator- Returns:
EvaluationContextThe current transaction context
-
setTransactionContext
Sets the transaction context.- Specified by:
setTransactionContextin interfaceTransactionContextPropagator
-