Module io.helidon.faulttolerance
Package io.helidon.faulttolerance
Class Retry.FibonacciRetryPolicy.Builder
java.lang.Object
io.helidon.faulttolerance.Retry.FibonacciRetryPolicy.Builder
- All Implemented Interfaces:
Builder<Retry.FibonacciRetryPolicy.Builder,
,Retry.FibonacciRetryPolicy> Supplier<Retry.FibonacciRetryPolicy>
- Enclosing class:
- Retry.FibonacciRetryPolicy
public static class Retry.FibonacciRetryPolicy.Builder
extends Object
implements Builder<Retry.FibonacciRetryPolicy.Builder,Retry.FibonacciRetryPolicy>
Fluent API builder for
Retry.FibonacciRetryPolicy
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the instance from this builder.calls
(int calls) Total number of calls (first + retries).Load all properties for this Retry Policy from configuration.initialDelay
(Duration initialDelay) Initial Delay in Milliseconds.jitter
(long jitter) Random part of the delay.Max Delay in Milliseconds.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<Retry.FibonacciRetryPolicy.Builder,
Retry.FibonacciRetryPolicy> - Returns:
- instance of the built type
-
calls
Total number of calls (first + retries).- Parameters:
calls
- how many times to call the method- Returns:
- updated builder instance
-
initialDelay
Initial Delay in Milliseconds.- Parameters:
initialDelay
- Duration- Returns:
- updated builder instance
-
maxDelay
Max Delay in Milliseconds.- Parameters:
maxDelay
- Duration- Returns:
- updated builder instance
-
jitter
Random part of the delay. A number between[-jitter,+jitter]
is applied to delay each time delay is calculated.- Parameters:
jitter
- jitter duration- Returns:
- updated builder instance
-
config
Load all properties for this Retry Policy from configuration.
Configuration key default value description calls 10 Number of calls initial-delay 2 Initial delay max-delay 3 minutes Maximum delay jitter 50 milliseconds A number between [-jitter,+jitter]
applied to delay- Parameters:
config
- the config node to use- Returns:
- updated builder instance
-