OPEN - issue BATCH-789: Remove mark/reset from ItemReader
Removed all code from mark() and reset() implementations
This commit is contained in:
@@ -26,8 +26,6 @@ import org.springframework.batch.core.StepContribution;
|
||||
import org.springframework.batch.item.ItemProcessor;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.item.MarkFailedException;
|
||||
import org.springframework.batch.item.ResetFailedException;
|
||||
import org.springframework.batch.repeat.ExitStatus;
|
||||
import org.springframework.batch.repeat.RepeatCallback;
|
||||
import org.springframework.batch.repeat.RepeatContext;
|
||||
@@ -180,20 +178,6 @@ public class ItemOrientedStepHandler<T, S> implements StepHandler {
|
||||
itemWriter.write(Collections.singletonList(item));
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws MarkFailedException
|
||||
*/
|
||||
public void mark() throws MarkFailedException {
|
||||
itemReader.mark();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ResetFailedException
|
||||
*/
|
||||
public void reset() throws ResetFailedException {
|
||||
itemReader.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
*
|
||||
|
||||
@@ -18,8 +18,6 @@ package org.springframework.batch.core.step.item;
|
||||
import org.springframework.batch.core.StepContribution;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.item.MarkFailedException;
|
||||
import org.springframework.batch.item.ResetFailedException;
|
||||
import org.springframework.batch.repeat.ExitStatus;
|
||||
|
||||
/**
|
||||
@@ -45,16 +43,4 @@ public interface StepHandler {
|
||||
*/
|
||||
ExitStatus handle(StepContribution contribution) throws Exception;
|
||||
|
||||
/**
|
||||
* Implementations should delegate to an {@link ItemReader}.
|
||||
*
|
||||
*/
|
||||
void mark() throws MarkFailedException;
|
||||
|
||||
/**
|
||||
* Implementations should delegate to an {@link ItemReader}.
|
||||
*
|
||||
*/
|
||||
void reset() throws ResetFailedException;
|
||||
|
||||
}
|
||||
|
||||
@@ -205,7 +205,6 @@ public class StepHandlerStep extends AbstractStep {
|
||||
protected ExitStatus doExecute(final StepExecution stepExecution) throws Exception {
|
||||
stream.update(stepExecution.getExecutionContext());
|
||||
getJobRepository().updateExecutionContext(stepExecution);
|
||||
itemHandler.mark();
|
||||
|
||||
final ExceptionHolder fatalException = new ExceptionHolder();
|
||||
|
||||
@@ -281,7 +280,6 @@ public class StepHandlerStep extends AbstractStep {
|
||||
}
|
||||
|
||||
try {
|
||||
itemHandler.mark();
|
||||
transactionManager.commit(transaction);
|
||||
}
|
||||
catch (Exception e) {
|
||||
@@ -347,7 +345,6 @@ public class StepHandlerStep extends AbstractStep {
|
||||
stepExecution.rollback();
|
||||
|
||||
try {
|
||||
itemHandler.reset();
|
||||
transactionManager.rollback(transaction);
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user