Class ContextPropagator.EmptyContextPropagator<T>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.function.Consumer<java.util.Optional<T>> clear()
      CleanUp value before thread execution finish.
      java.util.function.Consumer<java.util.Optional<T>> copy()
      Copies value from the parent thread into new executing thread.
      java.util.function.Supplier<java.util.Optional<T>> retrieve()
      Retrieves value from the currently executing thread.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EmptyContextPropagator

        public EmptyContextPropagator()
    • Method Detail

      • retrieve

        public java.util.function.Supplier<java.util.Optional<T>> retrieve()
        Description copied from interface: ContextPropagator
        Retrieves value from the currently executing thread. This method should produce values (as Supplier) that needs to be propagated to new thread.
        Specified by:
        retrieve in interface ContextPropagator<T>
        Returns:
        a Supplier producing the value from current thread
      • copy

        public java.util.function.Consumer<java.util.Optional<T>> copy()
        Description copied from interface: ContextPropagator
        Copies value from the parent thread into new executing thread. This method is passed with the values received from method ContextPropagator.retrieve() in the parent thread.
        Specified by:
        copy in interface ContextPropagator<T>
        Returns:
        a Consumer to set values in new thread.
      • clear

        public java.util.function.Consumer<java.util.Optional<T>> clear()
        Description copied from interface: ContextPropagator
        CleanUp value before thread execution finish. This method is passed with the values received from method ContextPropagator.retrieve() in the parent thread.
        Specified by:
        clear in interface ContextPropagator<T>
        Returns:
        a Consumer to cleanUp values.