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.
|
Constructor Summary |
FaultTolerantChunkProvider(org.springframework.batch.item.ItemReader<? extends I> itemReader,
org.springframework.batch.repeat.RepeatOperations repeatOperations)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FaultTolerantChunkProvider
public FaultTolerantChunkProvider(org.springframework.batch.item.ItemReader<? extends I> itemReader,
org.springframework.batch.repeat.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(org.springframework.batch.classify.Classifier<java.lang.Throwable,java.lang.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 java.lang.Exception
- Overrides:
read in class SimpleChunkProvider<I>
- Throws:
java.lang.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. All Rights Reserved.