OPEN - issue BATCH-789: Remove mark/reset from ItemReader

Shift chunk iteration into StepHandler - had to sacrifice interrupted check inside chunk
This commit is contained in:
dsyer
2008-08-20 15:24:05 +00:00
parent dbc24626f3
commit ef4f2900cc
19 changed files with 524 additions and 637 deletions

View File

@@ -7,9 +7,7 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.listener.StepExecutionListenerSupport;
import org.springframework.batch.item.ClearFailedException;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.FlushFailedException;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.ItemWriter;
@@ -78,20 +76,6 @@ public class ChunkMessageChannelItemWriter<T> extends StepExecutionListenerSuppo
}
/**
* No-op.
* @see org.springframework.batch.item.ItemWriter#flush()
*/
public void flush() throws FlushFailedException {
}
/**
* No-op.
* @see org.springframework.batch.item.ItemWriter#clear()
*/
public void clear() throws ClearFailedException {
}
@Override
public void beforeStep(StepExecution stepExecution) {
localState.setStepExecution(stepExecution);
@@ -169,6 +153,7 @@ public class ChunkMessageChannelItemWriter<T> extends StepExecutionListenerSuppo
Assert.state(jobInstanceId.equals(localState.getJobId()), "Message contained wrong job instance id ["
+ jobInstanceId + "] should have been [" + localState.getJobId() + "].");
localState.actual++;
// TODO: apply the skip count
ExitStatus result = payload.getExitStatus();
// TODO: check it can never be ExitStatus.FINISHED?
if (!result.isContinuable()) {