- java.lang.Object
-
- io.helidon.faulttolerance.FaultTolerance.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FaultTolerance.Builder
add(FtHandler ft)
Add a handler to the list.B
addBreaker(CircuitBreaker breaker)
Add a circuit breaker to the list.B
addBulkhead(Bulkhead bulkhead)
Add a bulkhead to the list.<U> FaultTolerance.TypedBuilder<U>
addFallback(Fallback<U> fallback)
Add a fallback to the list of handlers.B
addRetry(Retry retry)
Add a retry to the list.B
addTimeout(Timeout timeout)
Add a timeout to the list.FtHandler
build()
Build the instance from this builder.
-
-
-
Method Detail
-
build
public FtHandler build()
Description copied from interface:Builder
Build the instance from this builder.
-
addFallback
public <U> FaultTolerance.TypedBuilder<U> addFallback(Fallback<U> fallback)
Add a fallback to the list of handlers.- Type Parameters:
U
- type of future- Parameters:
fallback
- fallback instance- Returns:
- a new typed builder instance
-
add
public FaultTolerance.Builder 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
-
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
-
-