public class DefaultRetryState extends Object implements RetryState
| Constructor and Description |
|---|
DefaultRetryState(Object key)
Defaults the force refresh flag (to false) and the rollback classifier
(to null).
|
DefaultRetryState(Object key,
boolean forceRefresh)
Defaults the rollback classifier to null.
|
DefaultRetryState(Object key,
boolean forceRefresh,
Classifier<? super Throwable,Boolean> rollbackClassifier)
Create a
DefaultRetryState representing the state for a new retry
attempt. |
DefaultRetryState(Object key,
Classifier<? super Throwable,Boolean> rollbackClassifier)
Defaults the force refresh flag to false.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getKey()
Key representing the state for a retry attempt.
|
boolean |
isForceRefresh()
Indicate whether a cache lookup can be avoided.
|
boolean |
rollbackFor(Throwable exception)
Check whether this exception requires a rollback.
|
String |
toString() |
public DefaultRetryState(Object key, boolean forceRefresh, Classifier<? super Throwable,Boolean> rollbackClassifier)
DefaultRetryState representing the state for a new retry
attempt.key - the key for the state to allow this retry attempt to be
recognisedforceRefresh - true if the attempt is known to be a brand new state
(could not have previously failed)rollbackClassifier - the rollback classifier to set. The rollback
classifier answers true if the exception provided should cause a
rollback.RetryOperations.execute(RetryCallback, RetryState),
RetryOperations.execute(RetryCallback, RecoveryCallback, RetryState)public DefaultRetryState(Object key, Classifier<? super Throwable,Boolean> rollbackClassifier)
public DefaultRetryState(Object key, boolean forceRefresh)
public DefaultRetryState(Object key)
public Object getKey()
RetryStategetKey in interface RetryStatepublic boolean isForceRefresh()
RetryStateisForceRefresh in interface RetryStatepublic boolean rollbackFor(Throwable exception)
RetryStaterollbackFor in interface RetryStateexception - the exception that caused a retry attempt to failCopyright © 2014 SpringSource. All rights reserved.