Package io.smallrye.context.impl
Interface ContextHolder
- All Known Subinterfaces:
ContextualBiConsumer<T,,U> ContextualBiFunction<T,,U, R> ContextualCallable<T>,ContextualConsumer<T>,ContextualExecutor,ContextualFunction<T,,R> ContextualRunnable,ContextualSupplier<R>
- All Known Implementing Classes:
ContextualBiConsumer1,ContextualBiConsumer2,ContextualBiConsumerN,ContextualBiFunction1,ContextualBiFunction2,ContextualBiFunctionN,ContextualCallable1,ContextualCallable2,ContextualCallableN,ContextualConsumer1,ContextualConsumer2,ContextualConsumerN,ContextualExecutor1,ContextualExecutor2,ContextualExecutorN,ContextualFunction1,ContextualFunction2,ContextualFunctionN,ContextualRunnable1,ContextualRunnable2,ContextualRunnableN,ContextualSupplier1,ContextualSupplier2,ContextualSupplierN
public interface ContextHolder
Interface to be implemented by contextual wrappers so the plan can feed them thread locals.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcaptureThreadLocal(int index, ThreadLocal<Object> threadLocal, Object value) Store a thread local and its current value while capturing, in a way that storage is flattend in the context wrapper with minimal allocation.
-
Method Details
-
captureThreadLocal
Store a thread local and its current value while capturing, in a way that storage is flattend in the context wrapper with minimal allocation.- Parameters:
index- the context provider indexthreadLocal- the context provider's threadLocalvalue- the current or cleared value of the threadLocal (depending on ThreadContext settings)
-