Class ContextualFunction2<T,R>
- java.lang.Object
-
- io.smallrye.context.impl.wrappers.ContextualFunction2<T,R>
-
- All Implemented Interfaces:
ContextHolder,Contextualized,ContextualFunction<T,R>,Function<T,R>
public class ContextualFunction2<T,R> extends Object implements ContextualFunction<T,R>
-
-
Constructor Summary
Constructors Constructor Description ContextualFunction2(Function<T,R> function)
-
Method Summary
Modifier and Type Method Description Rapply(T t)voidcaptureThreadLocal(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 Detail
-
captureThreadLocal
public void captureThreadLocal(int index, ThreadLocal<Object> threadLocal, Object value)Description copied from interface:ContextHolderStore a thread local and its current value while capturing, in a way that storage is flattend in the context wrapper with minimal allocation.- Specified by:
captureThreadLocalin interfaceContextHolder- Parameters:
index- the context provider indexthreadLocal- the context provider's threadLocalvalue- the current or cleared value of the threadLocal (depending on ThreadContext settings)
-
-