Module io.helidon.common.context
Package io.helidon.common.context.spi
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
-
Method Details
-
data
T data()Return data that should be propagated.- Returns:
- data for propagation
-
propagateData
Propagates the data to be used by the new thread.- Parameters:
data
- data for propagation
-
clearData
Clears the propagated data from the new thread when it finishes.- Parameters:
data
- data for propagation
-