Package io.micronaut.retry.annotation
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
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescription@Digits(integer=4,fraction=0) String@Digits(integer=1,fraction=2) String@Digits(integer=2,fraction=2) StringClass<? extends RetryPredicate> -
Field Summary
Fields
-
Field Details
-
MAX_INTEGRAL_DIGITS
static final int MAX_INTEGRAL_DIGITS- See Also:
-
-
Element Details
-
value
- Returns:
- The exception types to include (defaults to all)
- Default:
{}
-
includes
- Returns:
- The exception types to include (defaults to all)
- Default:
{}
-
excludes
- Returns:
- The exception types to exclude (defaults to none)
- Default:
{}
-
attempts
- Returns:
- The maximum number of retry attempts
- Default:
"3"
-
delay
String delay- Returns:
- The delay between retry attempts
- Default:
"1s"
-
maxDelay
String maxDelay- Returns:
- The maximum overall delay
- Default:
""
-
multiplier
- Returns:
- The multiplier to use to calculate the delay
- Default:
"1.0"
-
predicate
Class<? extends RetryPredicate> predicate- Returns:
- The retry predicate class to use instead of
includes()andexcludes()(defaults to none)
- Default:
io.micronaut.retry.annotation.DefaultRetryPredicate.class
-
capturedException
- Returns:
- The capture exception types (defaults to RuntimeException)
- Default:
java.lang.RuntimeException.class
-
jitter
- Returns:
- The jitter factor used to apply random deviation to retry delays
- Default:
"0.0"
-