org.springframework.batch.core.step.item
Class FaultTolerantChunkProvider<I>
java.lang.Object
org.springframework.batch.core.step.item.SimpleChunkProvider<I>
org.springframework.batch.core.step.item.FaultTolerantChunkProvider<I>
- All Implemented Interfaces:
- ChunkProvider<I>
public class FaultTolerantChunkProvider<I>
- extends SimpleChunkProvider<I>
FaultTolerant implementation of the ChunkProcessor
interface, that
allows for skipping or retry of items that cause exceptions during reading or
processing.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FaultTolerantChunkProvider
public FaultTolerantChunkProvider(ItemReader<? extends I> itemReader,
RepeatOperations repeatOperations)
setSkipPolicy
public void setSkipPolicy(SkipPolicy SkipPolicy)
- The policy that determines whether exceptions can be skipped on read.
- Parameters:
SkipPolicy
-
setRollbackClassifier
public void setRollbackClassifier(Classifier<Throwable,Boolean> rollbackClassifier)
- Classifier to determine whether exceptions have been marked as
no-rollback (as opposed to skippable). If ecnounterd they are simply
ignored, unless also skippable.
- Parameters:
rollbackClassifier
- the rollback classifier to set
read
protected I read(StepContribution contribution,
Chunk<I> chunk)
throws Exception
- Overrides:
read
in class SimpleChunkProvider<I>
- Throws:
Exception
postProcess
public void postProcess(StepContribution contribution,
Chunk<I> chunk)
- Specified by:
postProcess
in interface ChunkProvider<I>
- Overrides:
postProcess
in class SimpleChunkProvider<I>
Copyright © 2009 SpringSource. All Rights Reserved.