org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceDefinitionException .
When a method returns and the retry policy is present, the following rules are applied:
abortOn() parameter, the thrown object
is rethrown.
retryOn() parameter, the method call
is retried.
Throwable which is not an Error or Exception, non-portable behavior
results.
maxRetries(), delay(), delayUnit(), maxDuration(), durationUnit(), jitter(), jitterDelayUnit(), retryOn(), abortOn()
| Modifier and Type | Method and Description |
|---|---|
| public Class | Returns: the exception types on which to abort (not retry)The list of exception types that should not trigger a retry. |
| public long | |
| public ChronoUnit | |
| public ChronoUnit | |
| public long | 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.Set the jitter to randomly vary retry delays for. |
| public ChronoUnit | |
| public long | |
| public int | Returns: the max number of retries. -1 means retry forever. The value must be greater than or equal to -1.The max number of the retries. |
| public Class | Returns: the exception types on which to retryThe list of exception types that should trigger a retry. |
| abortOn | back to summary |
|---|---|
| public Class The list of exception types that should not trigger a retry.
This list takes priority over the types listed in
Note that if a method throws a | |
| delay | back to summary |
|---|---|
| public long delay() The delay between retries. Defaults to 0. The value must be greater than or equal to 0.
| |
| delayUnit | back to summary |
|---|---|
| public ChronoUnit delayUnit() The unit for
| |
| durationUnit | back to summary |
|---|---|
| public ChronoUnit durationUnit() The duration unit for
| |
| jitter | back to summary |
|---|---|
| public 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.
| |
| jitterDelayUnit | back to summary |
|---|---|
| public ChronoUnit jitterDelayUnit() The delay unit for
| |
| maxDuration | back to summary |
|---|---|
| public long maxDuration() The max duration. The max duration must be greater than the delay duration if set. 0 means not set.
| |
| maxRetries | back to summary |
|---|---|
| public int maxRetries() The max number of the retries.
| |
| retryOn | back to summary |
|---|---|
| public Class The list of exception types that should trigger a retry.
Note that if a method throws a | |