OPEN - issue BATCH-777: Parametrise RetryCallback and related interfaces
RetryCallback and RecoveryCallback done
This commit is contained in:
@@ -86,7 +86,7 @@ public class SimpleRetryExceptionHandler extends RetryListenerSupport implements
|
||||
* @see org.springframework.batch.retry.RetryListener#close(org.springframework.batch.retry.RetryContext,
|
||||
* org.springframework.batch.retry.RetryCallback, java.lang.Throwable)
|
||||
*/
|
||||
public void close(RetryContext context, RetryCallback callback, Throwable throwable) {
|
||||
public <T> void close(RetryContext context, RetryCallback<T> callback, Throwable throwable) {
|
||||
if (!retryPolicy.canRetry(context)) {
|
||||
getRepeatContext().setAttribute(EXHAUSTED, "true");
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ public class SkipLimitStepFactoryBean<T, S> extends SimpleStepFactoryBean<T, S>
|
||||
*/
|
||||
private void retryChunk(final Chunk<S> chunk, final StepContribution contribution) throws Exception {
|
||||
|
||||
RetryCallback retryCallback = new RetryCallback() {
|
||||
RetryCallback<Object> retryCallback = new RetryCallback<Object>() {
|
||||
public Object doWithRetry(RetryContext context) throws Exception {
|
||||
doWrite(chunk.getItems());
|
||||
// TODO: if there is an exception marked as no rollback it
|
||||
@@ -441,7 +441,7 @@ public class SkipLimitStepFactoryBean<T, S> extends SimpleStepFactoryBean<T, S>
|
||||
}
|
||||
};
|
||||
|
||||
RecoveryCallback recoveryCallback = new RecoveryCallback() {
|
||||
RecoveryCallback<Object> recoveryCallback = new RecoveryCallback<Object>() {
|
||||
|
||||
public Object recover(RetryContext context) throws Exception {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user