public interface RetryOperations
RetryOperations to
execute operations with configurable retry behaviour.| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(RetryCallback<T> retryCallback)
Execute the supplied
RetryCallback with the configured retry
semantics. |
<T> T |
execute(RetryCallback<T> retryCallback,
RecoveryCallback<T> recoveryCallback)
Execute the supplied
RetryCallback with a fallback on exhausted
retry to the RecoveryCallback. |
<T> T |
execute(RetryCallback<T> retryCallback,
RecoveryCallback<T> recoveryCallback,
RetryState retryState)
A stateful retry with a recovery path.
|
<T> T |
execute(RetryCallback<T> retryCallback,
RetryState retryState)
A simple stateful retry.
|
<T> T execute(RetryCallback<T> retryCallback) throws Exception
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.<T> T execute(RetryCallback<T> retryCallback, RecoveryCallback<T> recoveryCallback) throws Exception
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.<T> T execute(RetryCallback<T> retryCallback, RetryState retryState) throws Exception, 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 reached<T> T execute(RetryCallback<T> retryCallback, RecoveryCallback<T> recoveryCallback, RetryState retryState) throws Exception
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.execute(RetryCallback, RetryState)Copyright © 2014 SpringSource. All rights reserved.