-
- All Known Subinterfaces:
Bulkhead,CircuitBreaker,Retry,Timeout
public interface FtHandlerA fault tolerance handler. The following handlers do NOT implement this interface:Async- used to create reactive objects from blocking synchronous calls through an executor serviceFallback- implementsFtHandlerTypedinstead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Single<T>invoke(Supplier<? extends CompletionStage<T>> supplier)Invoke this fault tolerance handler on a supplier of aCompletionStage, such as aSingle.<T> Multi<T>invokeMulti(Supplier<? extends Flow.Publisher<T>> supplier)Invoke this fault tolerance handler on a supplier of aFlow.Publisher, such as aMulti.Stringname()A name assigned to a handler for debugging, error reporting or configuration purposes.
-
-
-
Method Detail
-
name
String name()
A name assigned to a handler for debugging, error reporting or configuration purposes.- Returns:
- a non-null name for this handler
-
invoke
<T> Single<T> invoke(Supplier<? extends CompletionStage<T>> supplier)
Invoke this fault tolerance handler on a supplier of aCompletionStage, such as aSingle.- Type Parameters:
T- type of future result- 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
<T> Multi<T> invokeMulti(Supplier<? extends Flow.Publisher<T>> supplier)
Invoke this fault tolerance handler on a supplier of aFlow.Publisher, such as aMulti.- Type Parameters:
T- type of future result- 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
-
-