- All Superinterfaces:
Prototype.Api
,Prototype.Factory<Retry>
- All Known Implementing Classes:
RetryConfig.BuilderBase.RetryConfigImpl
Retry
configuration bean.- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forRetry
.static class
RetryConfig.BuilderBase<BUILDER extends RetryConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends RetryConfig> Fluent API builder base forRetry
. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplyOn()
These throwables will be considered retriable.static RetryConfig.Builder
builder()
Create a new fluent API builder to customize configuration.static RetryConfig.Builder
builder
(RetryConfig instance) Create a new fluent API builder from an existing instance.int
calls()
Number of calls (first try + retries).static RetryConfig
create()
Create a new instance with default values.static RetryConfig
Create a new instance from configuration.delay()
Base delay between try and retry.double
Delay retry policy factor.jitter()
Jitter forRetry.JitterRetryPolicy
.name()
Name for debugging, error reporting, monitoring.Overall timeout of all retries combined.Explicitly configured retry policy.skipOn()
These throwables will not be considered retriable, all other will.Methods inherited from interface io.helidon.builder.api.Prototype.Factory
build
-
Field Details
-
DEFAULT_CALLS
static final int DEFAULT_CALLSDefault calls to make.- See Also:
-
DEFAULT_DELAY
Default delay between retries.- See Also:
-
DEFAULT_OVERALL_TIMEOUT
Default overall timeout.- See Also:
-
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
name
Name for debugging, error reporting, monitoring.- Returns:
- name of this retry
-
calls
int calls()Number of calls (first try + retries).- Returns:
- number of desired calls, must be 1 (means no retries) or higher.
-
delay
Duration delay()Base delay between try and retry. Defaults to200 ms
.- Returns:
- delay between retries (combines with retry policy)
-
delayFactor
double delayFactor()Delay retry policy factor. If unspecified (value of-1
), Jitter retry policy would be used, unless jitter is also unspecified.Default when
Retry.DelayingRetryPolicy
is used is2
.- Returns:
- delay factor for delaying retry policy
-
jitter
Duration jitter()Jitter forRetry.JitterRetryPolicy
. If unspecified (value of-1
), delaying retry policy is used. If both this value, anddelayFactor()
are specified, delaying retry policy would be used.- Returns:
- jitter
-
overallTimeout
Duration overallTimeout()Overall timeout of all retries combined.- Returns:
- overall timeout
-
skipOn
These throwables will not be considered retriable, all other will.- Returns:
- throwable classes to skip retries
- See Also:
-
applyOn
These throwables will be considered retriable.- Returns:
- throwable classes to trigger retries
- See Also:
-
retryPolicy
Optional<Retry.RetryPolicy> retryPolicy()Explicitly configured retry policy.- Returns:
- retry policy
-