Annotation Interface Ft.Retry
- Enclosing class:
Ft
The annotated method (or all methods on annotated type) will be retried according to the configuration.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThese throwables will be considered retriable.intNumber of calls (first try + retries).Duration to delay Defaults to200milliseconds.doubleDelay retry policy factor.Random jitter applied to the delay.doubleRandom jitter relative to the calculated delay, from0(inclusive) to1(exclusive).Maximum delay between invocation attempts, including jitter.If named, an attempt will be made to find a namedRetryinstance in service registry.Duration of overall timeout.These throwables will not be considered retriable, all other will.
-
Element Details
-
name
-
calls
int callsNumber of calls (first try + retries).- Returns:
- number of desired calls, must be 1 (means no retries) or higher.
- Default:
3
-
delay
String delayDuration to delay Defaults to200milliseconds.- Returns:
- duration to delay, such as
PT1S(1 second) - See Also:
- Default:
"PT0.2S"
-
delayFactor
double delayFactorDelay retry policy factor. If unspecified (value of-1), a factor of2is used unless jitter is configured, in which case the delay remains constant.When both this option and
jitter()are configured, the delay factor is applied first and jitter is applied independently to the resulting delay. A jittered delay does not affect later base-delay calculations.- Returns:
- delay factor for delaying retry policy
- Default:
-1.0
-
jitter
String jitterRandom jitter applied to the delay. If unspecified (value ofPT-1S), jitter is not applied. When both this option anddelayFactor()are configured, the delay factor is applied first and jitter is applied independently to the resulting delay. A jittered delay does not affect later base-delay calculations. The final delay is capped bymaxDelay(), when configured.- Returns:
- jitter duration
- See Also:
- Default:
"PT-1S"
-
jitterFactor
double jitterFactorRandom jitter relative to the calculated delay, from0(inclusive) to1(exclusive). For example, a value of0.2applies a random jitter of up to twenty percent in either direction. This option cannot be combined with an explicitly configuredabsolute jitter. Each retry applies relative jitter independently, and a jittered delay does not affect later base-delay calculations. A value of-1means relative jitter is not configured.- Returns:
- relative jitter factor
- Default:
-1.0
-
maxDelay
String maxDelayMaximum delay between invocation attempts, including jitter. If unspecified (value ofPT-1S), the delay is not capped.- Returns:
- maximum delay
- See Also:
- Default:
"PT-1S"
-
overallTimeout
String overallTimeoutDuration of overall timeout. Defaults toPT1S(1 second).- Returns:
- duration of overall timeout
- Default:
"PT1S"
-
applyOn
-
skipOn
-