Module io.helidon.faulttolerance
Package io.helidon.faulttolerance
Class Retry.DelayingRetryPolicy.Builder
- java.lang.Object
-
- io.helidon.faulttolerance.Retry.DelayingRetryPolicy.Builder
-
- All Implemented Interfaces:
Builder<Retry.DelayingRetryPolicy>
,Supplier<Retry.DelayingRetryPolicy>
- Enclosing class:
- Retry.DelayingRetryPolicy
public static class Retry.DelayingRetryPolicy.Builder extends Object implements Builder<Retry.DelayingRetryPolicy>
Fluent API builder forRetry.DelayingRetryPolicy
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Retry.DelayingRetryPolicy
build()
Build the instance from this builder.Retry.DelayingRetryPolicy.Builder
calls(int calls)
Total number of calls (first + retries).Retry.DelayingRetryPolicy.Builder
config(Config config)
Load all properties for this circuit breaker from configuration.Retry.DelayingRetryPolicy.Builder
delay(Duration delay)
Base delay between the invocations.Retry.DelayingRetryPolicy.Builder
delayFactor(double delayFactor)
A delay multiplication factor.
-
-
-
Method Detail
-
build
public Retry.DelayingRetryPolicy build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<Retry.DelayingRetryPolicy>
- Returns:
- instance of the built type
-
calls
public Retry.DelayingRetryPolicy.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.DelayingRetryPolicy.Builder delay(Duration delay)
Base delay between the invocations.- Parameters:
delay
- delay between the invocations- Returns:
- updated builder instance
-
delayFactor
public Retry.DelayingRetryPolicy.Builder delayFactor(double delayFactor)
A delay multiplication factor.- Parameters:
delayFactor
- a delay multiplication factor- Returns:
- updated builder instance
-
config
public Retry.DelayingRetryPolicy.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 delay-factor 2 A delay multiplication factor - Parameters:
config
- the config node to use- Returns:
- updated builder instance
-
-