Annotation Type Retry
-
@Inherited @Documented @Retention(RUNTIME) @Target({METHOD,TYPE}) @InterceptorBinding public @interface Retry
The Retry annotation to define the number of the retries and the fallback method on reaching the retry counts. Any invalid config value causesFaultToleranceDefinitionException
.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class<? extends java.lang.Throwable>[]
abortOn
long
delay
The delay between retries.java.time.temporal.ChronoUnit
delayUnit
java.time.temporal.ChronoUnit
durationUnit
long
jitter
Set the jitter to randomly vary retry delays for.java.time.temporal.ChronoUnit
jitterDelayUnit
long
maxDuration
The max duration.int
maxRetries
java.lang.Class<? extends java.lang.Throwable>[]
retryOn
-
-
-
-
jitter
long jitter
Set the jitter to randomly vary retry delays for. The value must be greater than or equals to 0. 0 means not set.
The effective delay will be [delay - jitter, delay + jitter] and always greater than or equal to 0. Negative effective delays will be 0.- Returns:
- the jitter that randomly vary retry delays by. e.g. a jitter of 200 milliseconds will randomly add between -200 and 200 milliseconds to each retry delay.
- Default:
- 200L
-
-