Package io.github.resilience4j.core
Class ContextPropagator.EmptyContextPropagator<T>
java.lang.Object
io.github.resilience4j.core.ContextPropagator.EmptyContextPropagator<T>
- Type Parameters:
T- type of class.
- All Implemented Interfaces:
ContextPropagator<T>
- Enclosing interface:
- ContextPropagator<T>
public static class ContextPropagator.EmptyContextPropagator<T>
extends Object
implements ContextPropagator<T>
A convenient implementation of empty
ContextPropagator-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.resilience4j.core.ContextPropagator
ContextPropagator.EmptyContextPropagator<T> -
Field Summary
Fields inherited from interface io.github.resilience4j.core.ContextPropagator
CONTEXT_PROPAGATOR_LIST_SHOULD_BE_NON_NULL -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EmptyContextPropagator
public EmptyContextPropagator()
-
-
Method Details
-
retrieve
Description copied from interface:ContextPropagatorRetrieves value from the currently executing thread. This method should produce values (as Supplier) that needs to be propagated to new thread.- Specified by:
retrievein interfaceContextPropagator<T>- Returns:
- a Supplier producing the value from current thread
-
copy
Description copied from interface:ContextPropagatorCopies value from the parent thread into new executing thread. This method is passed with the values received from methodContextPropagator.retrieve()in the parent thread.- Specified by:
copyin interfaceContextPropagator<T>- Returns:
- a Consumer to set values in new thread.
-
clear
Description copied from interface:ContextPropagatorCleanUp value before thread execution finish. This method is passed with the values received from methodContextPropagator.retrieve()in the parent thread.- Specified by:
clearin interfaceContextPropagator<T>- Returns:
- a Consumer to cleanUp values.
-