- java.lang.Object
-
- io.helidon.logging.slf4j.Slf4jMdcPropagator
-
- All Implemented Interfaces:
DataPropagationProvider<Map<String,String>>
public class Slf4jMdcPropagator extends Object implements DataPropagationProvider<Map<String,String>>
This is propagator of Slf4j MDC values between different threads. This class is loaded and used via SPI.
-
-
Constructor Summary
Constructors Constructor Description Slf4jMdcPropagator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearData(Map<String,String> data)
Clears the propagated data from the new thread when it finishes.Map<String,String>
data()
Return data that should be propagated.void
propagateData(Map<String,String> data)
Propagates the data to be used by the new thread.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.common.context.spi.DataPropagationProvider
clearData
-
-
-
-
Method Detail
-
data
public Map<String,String> data()
Description copied from interface:DataPropagationProvider
Return data that should be propagated.- Specified by:
data
in interfaceDataPropagationProvider<Map<String,String>>
- Returns:
- data for propagation
-
propagateData
public void propagateData(Map<String,String> data)
Description copied from interface:DataPropagationProvider
Propagates the data to be used by the new thread.- Specified by:
propagateData
in interfaceDataPropagationProvider<Map<String,String>>
- Parameters:
data
- data for propagation
-
clearData
public void clearData(Map<String,String> data)
Description copied from interface:DataPropagationProvider
Clears the propagated data from the new thread when it finishes.- Specified by:
clearData
in interfaceDataPropagationProvider<Map<String,String>>
- Parameters:
data
- data for propagation
-
-