public interface RetryOperations
RetryOperations to
execute operations with configurable retry behaviour.| Modifier and Type | Method and Description |
|---|---|
<T,E extends Throwable> |
execute(RetryCallback<T,E> retryCallback)
Execute the supplied
RetryCallback with the configured retry
semantics. |
<T,E extends Throwable> |
execute(RetryCallback<T,E> retryCallback,
RecoveryCallback<T> recoveryCallback)
Execute the supplied
RetryCallback with a fallback on exhausted
retry to the RecoveryCallback. |
<T,E extends Throwable> |
execute(RetryCallback<T,E> retryCallback,
RecoveryCallback<T> recoveryCallback,
RetryState retryState)
A stateful retry with a recovery path.
|
<T,E extends Throwable> |
execute(RetryCallback<T,E> retryCallback,
RetryState retryState)
A simple stateful retry.
|
<T,E extends Throwable> T execute(RetryCallback<T,E> retryCallback) throws E extends Throwable
RetryCallback with the configured retry
semantics. See implementations for configuration details.RetryCallback upon successful
invocation.Exception - any Exception raised by the
RetryCallback upon unsuccessful retry.Throwable<T,E extends Throwable> T execute(RetryCallback<T,E> retryCallback, RecoveryCallback<T> recoveryCallback) throws E extends Throwable
RetryCallback with a fallback on exhausted
retry to the RecoveryCallback. See implementations for
configuration details.RetryCallback upon successful
invocation, and that returned by the RecoveryCallback otherwise.Exception - any Exception raised by the
RecoveryCallback upon unsuccessful retry.E extends Throwable<T,E extends Throwable> T execute(RetryCallback<T,E> retryCallback, RetryState retryState) throws E extends Throwable, ExhaustedRetryException
RetryCallback with
a target object for the attempt identified by the DefaultRetryState.
Exceptions thrown by the callback are always propagated immediately so
the state is required to be able to identify the previous attempt, if
there is one - hence the state is required. Normal patterns would see
this method being used inside a transaction, where the callback might
invalidate the transaction if it fails.RetryCallback upon successful
invocation, and that returned by the RecoveryCallback otherwise.Exception - any Exception raised by the
RecoveryCallback.ExhaustedRetryException - if the last attempt for this state has
already been reachedE extends Throwable<T,E extends Throwable> T execute(RetryCallback<T,E> retryCallback, RecoveryCallback<T> recoveryCallback, RetryState retryState) throws E extends Throwable
RetryCallback with a fallback on exhausted retry to the
RecoveryCallback and a target object for the retry attempt
identified by the DefaultRetryState.RetryCallback upon successful
invocation, and that returned by the RecoveryCallback otherwise.Exception - any Exception raised by the
RecoveryCallback upon unsuccessful retry.E extends Throwableexecute(RetryCallback, RetryState)Copyright © 2014 SpringSource. All rights reserved.