@Target(value={METHOD,TYPE}) @Retention(value=RUNTIME) @Documented public @interface Retryable
| Modifier and Type | Optional Element and Description |
|---|---|
Backoff |
backoff
Specify the backoff properties for retrying this operation.
|
String |
exceptionExpression
Specify an expression to be evaluated after the
SimpleRetryPolicy.canRetry() returns true - can be used to conditionally
suppress the retry. |
Class<? extends Throwable>[] |
exclude
Exception types that are not retryable.
|
Class<? extends Throwable>[] |
include
Exception types that are retryable.
|
String |
interceptor
Retry interceptor bean name to be applied for retryable method.
|
String |
label
A unique label for statistics reporting.
|
String[] |
listeners
Bean names of retry listeners to use instead of default ones defined in Spring
context
|
int |
maxAttempts |
String |
maxAttemptsExpression |
String |
recover
Name of method in this class to use for recover.
|
boolean |
stateful
Flag to say that the retry is stateful: i.e.
|
Class<? extends Throwable>[] |
value
Exception types that are retryable.
|
public abstract String interceptor
public abstract Class<? extends Throwable>[] exclude
public abstract String label
public abstract boolean stateful
public abstract int maxAttempts
public abstract String maxAttemptsExpression
maxAttempts().public abstract String exceptionExpression
SimpleRetryPolicy.canRetry() returns true - can be used to conditionally
suppress the retry. Only invoked after an exception is thrown. The root object for
the evaluation is the last Throwable. Other beans in the context can be
referenced. For example:
"message.contains('you can retry this')".
and
"@someBean.shouldRetry(#root)".
public abstract String[] listeners
Copyright © 2022 SpringSource. All rights reserved.