Class ContextualBiConsumer2<T,U>

java.lang.Object
io.smallrye.context.impl.wrappers.ContextualBiConsumer2<T,U>
All Implemented Interfaces:
ContextHolder, Contextualized, ContextualBiConsumer<T,U>, BiConsumer<T,U>

public class ContextualBiConsumer2<T,U> extends Object implements ContextualBiConsumer<T,U>
  • Constructor Details

    • ContextualBiConsumer2

      public ContextualBiConsumer2(BiConsumer<T,U> biConsumer)
  • Method Details

    • accept

      public void accept(T t, U u)
      Specified by:
      accept in interface BiConsumer<T,U>
    • 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)