Package io.micronaut.core.propagation
Interface ThreadPropagatedContextElement<S>
- Type Parameters:
- S- The type held by the wrapped thread-scoped variable.
- All Superinterfaces:
- PropagatedContextElement
- All Known Implementing Classes:
- MdcPropagationContext
A 
PropagatedContextElement that bridges to code that uses thread local storage instead of
 PropagatedContext. The object returned by updateThreadContext() will be given
 to restoreThreadContext(Object) when the propagation scope is closed.- Since:
- 4.0.0
- Author:
- Denis Stepanov
- 
Method SummaryModifier and TypeMethodDescriptionvoidrestoreThreadContext(S oldState) Restore the state on the propagation exit.Update the thread context on the propagation entry and return the state that will be used for the restore on the propagation exit.
- 
Method Details- 
updateThreadContextUpdate the thread context on the propagation entry and return the state that will be used for the restore on the propagation exit.- Returns:
- The state to be restored
 
- 
restoreThreadContextRestore the state on the propagation exit.- Parameters:
- oldState- The state to be restored
 
 
-