- Type Parameters:
T
- type of future result
- All Known Subinterfaces:
Fallback<T>
public interface FtHandlerTyped<T>
A typed fault tolerance handler, to allow combination
of multiple handlers without losing type information.
-
Method Summary
Modifier and TypeMethodDescriptioninvoke
(Supplier<? extends CompletionStage<T>> supplier) Invoke this fault tolerance handler on a supplier of aCompletionStage
, such as aSingle
.invokeMulti
(Supplier<? extends Flow.Publisher<T>> supplier) Invoke this fault tolerance handler on a supplier of aFlow.Publisher
, such as aMulti
.
-
Method Details
-
invoke
Invoke this fault tolerance handler on a supplier of aCompletionStage
, such as aSingle
.- Parameters:
supplier
- that provides the initial value for processing; depending on handler type, the supplier may be called multiple times- Returns:
- a new single that can be consumed that will carry out the fault tolerance in the background, may have a different error states than the original result obtained from supplier
-
invokeMulti
Invoke this fault tolerance handler on a supplier of aFlow.Publisher
, such as aMulti
.- Parameters:
supplier
- that provides the initial value for processing; depending on handler type, the supplier may be called multiple times- Returns:
- a new multi that can be consumed that will carry out the fault tolerance in the background, may have a different error states than the original result obtained from supplier
-