Module io.helidon.faulttolerance
Package io.helidon.faulttolerance
Class Retry.JitterRetryPolicy.Builder
- java.lang.Object
-
- io.helidon.faulttolerance.Retry.JitterRetryPolicy.Builder
-
- All Implemented Interfaces:
Builder<Retry.JitterRetryPolicy>
,Supplier<Retry.JitterRetryPolicy>
- Enclosing class:
- Retry.JitterRetryPolicy
public static class Retry.JitterRetryPolicy.Builder extends Object implements Builder<Retry.JitterRetryPolicy>
Fluent API builder forRetry.JitterRetryPolicy
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Retry.JitterRetryPolicy
build()
Build the instance from this builder.Retry.JitterRetryPolicy.Builder
calls(int calls)
Total number of calls (first + retries).Retry.JitterRetryPolicy.Builder
config(Config config)
Load all properties for this circuit breaker from configuration.Retry.JitterRetryPolicy.Builder
delay(Duration delay)
Base delay between the invocations.Retry.JitterRetryPolicy.Builder
jitter(Duration jitter)
Random part of the delay.
-
-
-
Method Detail
-
build
public Retry.JitterRetryPolicy build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<Retry.JitterRetryPolicy>
- Returns:
- instance of the built type
-
calls
public Retry.JitterRetryPolicy.Builder calls(int calls)
Total number of calls (first + retries).- Parameters:
calls
- how many times to call the method- Returns:
- updated builder instance
-
delay
public Retry.JitterRetryPolicy.Builder delay(Duration delay)
Base delay between the invocations.- Parameters:
delay
- delay between the invocations- Returns:
- updated builder instance
-
jitter
public Retry.JitterRetryPolicy.Builder jitter(Duration 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
public Retry.JitterRetryPolicy.Builder config(Config config)
Load all properties for this circuit breaker from configuration.
Configuration key default value description calls 3 Number of calls delay 200 millis Delay to wait between retries jitter 50 millis A number between [-jitter,+jitter]
applied to delay- Parameters:
config
- the config node to use- Returns:
- updated builder instance
-
-