OPEN - issue BATCH-777: Parametrise RetryCallback and related interfaces

Make stateful retry explicit in the RepeatOperations interface instead of hidden in a RetryPolicy
This commit is contained in:
dsyer
2008-08-25 12:00:42 +00:00
parent be03c892e3
commit 193f63a24a
22 changed files with 778 additions and 1518 deletions

View File

@@ -1,29 +0,0 @@
package org.springframework.batch.sample.common;
import org.springframework.batch.item.ClearFailedException;
import org.springframework.batch.item.FlushFailedException;
import org.springframework.batch.item.ItemWriter;
public class CompositeItemWriter<T> implements ItemWriter<T> {
ItemWriter<T> itemWriter;
public CompositeItemWriter(ItemWriter<T> itemWriter) {
this.itemWriter = itemWriter;
}
public void write(T item) throws Exception {
//Add business logic here
itemWriter.write(item);
}
public void clear() throws ClearFailedException {
itemWriter.clear();
}
public void flush() throws FlushFailedException {
itemWriter.flush();
}
}