Module io.helidon.faulttolerance
Package io.helidon.faulttolerance
Class FaultTolerance.TypedBuilder<T>
- java.lang.Object
-
- io.helidon.faulttolerance.FaultTolerance.TypedBuilder<T>
-
- All Implemented Interfaces:
Builder<FtHandlerTyped<T>>,Supplier<FtHandlerTyped<T>>
- Enclosing class:
- FaultTolerance
public static class FaultTolerance.TypedBuilder<T> extends Object implements Builder<FtHandlerTyped<T>>
A builder used for fault tolerance handlers that require a specific type to be used, such asFallback. An instance is returned fromFaultTolerance.Builder.addFallback(Fallback).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FaultTolerance.TypedBuilder<T>add(FtHandler ft)Add a handler to the list.BaddBreaker(CircuitBreaker breaker)Add a circuit breaker to the list.BaddBulkhead(Bulkhead bulkhead)Add a bulkhead to the list.FaultTolerance.TypedBuilder<T>addFallback(Fallback<T> fallback)Add a fallback to the list of handlers.BaddRetry(Retry retry)Add a retry to the list.BaddTimeout(Timeout timeout)Add a timeout to the list.FtHandlerTyped<T>build()Build the instance from this builder.
-
-
-
Method Detail
-
build
public FtHandlerTyped<T> build()
Description copied from interface:BuilderBuild the instance from this builder.
-
add
public FaultTolerance.TypedBuilder<T> add(FtHandler ft)
Add a handler to the list. This may be a custom handler or one of the predefined ones.- Parameters:
ft- fault tolerance handler to add- Returns:
- updated builder instance
-
addFallback
public FaultTolerance.TypedBuilder<T> addFallback(Fallback<T> fallback)
Add a fallback to the list of handlers.- Parameters:
fallback- fallback instance- Returns:
- updated builder instance
-
addBulkhead
public B addBulkhead(Bulkhead bulkhead)
Add a bulkhead to the list.- Parameters:
bulkhead- bulkhead handler- Returns:
- updated builder instance
-
addBreaker
public B addBreaker(CircuitBreaker breaker)
Add a circuit breaker to the list.- Parameters:
breaker- circuit breaker handler- Returns:
- updated builder instance
-
addTimeout
public B addTimeout(Timeout timeout)
Add a timeout to the list.- Parameters:
timeout- timeout handler- Returns:
- updated builder instance
-
addRetry
public B addRetry(Retry retry)
Add a retry to the list.- Parameters:
retry- retry handler- Returns:
- updated builder instance
-
-