|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.retry.callback.RecoveryRetryCallback
public class RecoveryRetryCallback
A RetryCallback
that knows about and caches an item, and attempts to
process it using a delegate RetryCallback
. Used by the
RecoveryCallbackRetryPolicy
to enable stateful retry of the
processing.
RecoveryCallbackRetryPolicy
,
RetryPolicy.handleRetryExhausted(RetryContext)
Constructor Summary | |
---|---|
RecoveryRetryCallback(Object item,
RetryCallback callback)
Constructor with mandatory properties. |
|
RecoveryRetryCallback(Object item,
RetryCallback callback,
Object key)
Constructor with mandatory properties. |
Method Summary | |
---|---|
Object |
doWithRetry(RetryContext context)
Execute an operation with retry semantics. |
Object |
getItem()
|
Object |
getKey()
Public getter for the key. |
RecoveryCallback |
getRecoveryCallback()
Accessor for the RecoveryCallback . |
boolean |
isForceRefresh()
|
void |
setForceRefresh(boolean forceRefresh)
Public setter for a flag signalling to clients of this callback that the processing is not a retry. |
void |
setRecoveryCallback(RecoveryCallback recoverer)
Setter for injecting optional recovery handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RecoveryRetryCallback(Object item, RetryCallback callback)
item
- the item to processcallback
- the delegate to use to process itpublic RecoveryRetryCallback(Object item, RetryCallback callback, Object key)
item
- the item to processcallback
- the delegate to use to process itMethod Detail |
---|
public Object getKey()
public void setRecoveryCallback(RecoveryCallback recoverer)
recoverer
- public void setForceRefresh(boolean forceRefresh)
forceRefresh
- the flag value to setpublic Object doWithRetry(RetryContext context) throws Throwable
RetryCallback
doWithRetry
in interface RetryCallback
context
- the current retry context.
Throwable
public Object getItem()
public boolean isForceRefresh()
public RecoveryCallback getRecoveryCallback()
RecoveryCallback
.
RecoveryCallback
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |