Class ContextualBiFunctionN<T,U,R>

java.lang.Object
io.smallrye.context.impl.wrappers.ContextualBiFunctionN<T,U,R>
All Implemented Interfaces:
ContextHolder, Contextualized, ContextualBiFunction<T,U,R>, BiFunction<T,U,R>

public class ContextualBiFunctionN<T,U,R> extends Object implements ContextualBiFunction<T,U,R>
  • Constructor Details

    • ContextualBiFunctionN

      public ContextualBiFunctionN(BiFunction<T,U,R> biFunction, int n)
  • Method Details

    • apply

      public R apply(T t, U u)
      Specified by:
      apply in interface BiFunction<T,U,R>
    • captureThreadLocal

      public void captureThreadLocal(int index, ThreadLocal<Object> threadLocal, Object value)
      Description copied from interface: ContextHolder
      Store 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:
      captureThreadLocal in interface ContextHolder
      Parameters:
      index - the context provider index
      threadLocal - the context provider's threadLocal
      value - the current or cleared value of the threadLocal (depending on ThreadContext settings)