Annotation Interface Retryable
@Documented
@Retention(RUNTIME)
@Target({METHOD,TYPE,ANNOTATION_TYPE})
@Around
@Type(DefaultRetryInterceptor.class)
public @interface Retryable
AOP Advice that can be applied to any method.
- Since:
- 1.0
- Author:
- graemerocher
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum integral digits for retry attempts validation. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionReturns the maximum number of retry attempts.Returns the exception type that should be intercepted for retry handling.Returns the delay between retry attempts.Returns the exception types to exclude, which defaults to none.Returns the exception types to include, which defaults to all.Returns the jitter factor used to apply random deviation to retry delays.Returns the maximum overall delay.Returns the multiplier to use to calculate the delay.Class<? extends RetryPredicate> Returns the retry predicate class to use instead ofincludes()andexcludes().Returns the exception types to include, which defaults to all.
-
Field Details
-
MAX_INTEGRAL_DIGITS
static final int MAX_INTEGRAL_DIGITSThe maximum integral digits for retry attempts validation.- See Also:
-
-
Element Details
-
value
-
includes
-
excludes
-
attempts
-
delay
String delayReturns the delay between retry attempts.- Returns:
- The delay between retry attempts
- Default:
"1s"
-
maxDelay
-
multiplier
-
predicate
Class<? extends RetryPredicate> predicateReturns the retry predicate class to use instead ofincludes()andexcludes().- Returns:
- The retry predicate class to use instead of
includes()andexcludes()(defaults to none)
- Default:
io.micronaut.retry.annotation.DefaultRetryPredicate.class
-
capturedException
Returns the exception type that should be intercepted for retry handling.- Returns:
- The exception type that should be intercepted for retry handling. Once an exception is captured,
it is still evaluated by
includes(),excludes(), orpredicate()to decide whether to retry. Defaults toException.
- Default:
java.lang.Exception.class
-
jitter
-