Interface DataPropagationProvider<T>

Type Parameters:
T - an actual type of the data which will be propagated
All Known Implementing Classes:
JaegerDataPropagationProvider, JulMdcPropagator, Slf4jMdcPropagator

public interface DataPropagationProvider<T>
This is an SPI provider which helps user to propagate values from one thread to another. Every provider has its method data() invoked before thread switch, to obtain value for propagation. After the thread is switched, the new thread executes propagateData(Object) to propagate data.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clearData(T data)
    Clears the propagated data from the new thread when it finishes.
    Return data that should be propagated.
    void
    Propagates the data to be used by the new thread.
  • Method Details

    • data

      T data()
      Return data that should be propagated.
      Returns:
      data for propagation
    • propagateData

      void propagateData(T data)
      Propagates the data to be used by the new thread.
      Parameters:
      data - data for propagation
    • clearData

      void clearData(T data)
      Clears the propagated data from the new thread when it finishes.
      Parameters:
      data - data for propagation