java.lang.Object
io.helidon.config.SimpleRetryPolicy.Builder
- All Implemented Interfaces:
Builder<SimpleRetryPolicy.Builder,
,SimpleRetryPolicy> Supplier<SimpleRetryPolicy>
- Enclosing class:
- SimpleRetryPolicy
public static final class SimpleRetryPolicy.Builder
extends Object
implements Builder<SimpleRetryPolicy.Builder,SimpleRetryPolicy>
Fluent API builder for
SimpleRetryPolicy
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the instance from this builder.callTimeout
(Duration callTimeout) Timeout for the individual invocation.Update this builder from meta configuration.Delay between the invocations.delayFactor
(double delayFactor) A delay multiplication factor.executorService
(ScheduledExecutorService executorService) An executor service to schedule retries and run timed operations on.overallTimeout
(Duration overallTimeout) Overall timeout.retries
(int retries) Number of retries (excluding the first invocation).
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<SimpleRetryPolicy.Builder,
SimpleRetryPolicy> - Returns:
- instance of the built type
-
config
Update this builder from meta configuration.Mandatory
properties
, seeRetryPolicies.repeat(int)
:retries
- typeint
properties
:delay
- typeDuration
, seedelay(Duration)
delay-factor
- typedouble
, seedelayFactor(double)
call-timeout
- typeDuration
, seecallTimeout(Duration)
overall-timeout
- typeDuration
, seeoverallTimeout(Duration)
- Parameters:
metaConfig
- meta configuration used to update this builder- Returns:
- updated builder instance
-
retries
Number of retries (excluding the first invocation).- Parameters:
retries
- how many times to retry- Returns:
- updated builder instance
-
delay
Delay between the invocations.- Parameters:
delay
- delay between the invocations- Returns:
- updated builder instance
-
delayFactor
A delay multiplication factor.- Parameters:
delayFactor
- a delay multiplication factor- Returns:
- updated builder instance
-
callTimeout
Timeout for the individual invocation.- Parameters:
callTimeout
- a timeout for the individual invocation- Returns:
- updated builder instance
-
overallTimeout
Overall timeout.- Parameters:
overallTimeout
- an overall timeout- Returns:
- updated builder instance
-
executorService
An executor service to schedule retries and run timed operations on.- Parameters:
executorService
- service- Returns:
- updated builder instance
-