类 JsrFaultTolerantChunkProcessor<I,O>
- java.lang.Object
- org.springframework.batch.core.jsr.step.item.JsrChunkProcessor<I,O>
- org.springframework.batch.core.jsr.step.item.JsrFaultTolerantChunkProcessor<I,O>
- 类型参数:
I
- input type for the stepO
- output type for the step
- 所有已实现的接口:
ChunkProcessor<I>
public class JsrFaultTolerantChunkProcessor<I,O> extends JsrChunkProcessor<I,O>
Extension of theJsrChunkProcessor
that adds skip and retry functionality.- 作者:
- Michael Minella, Chris Schaefer
字段概要
字段 修饰符和类型 字段 说明 protected org.apache.commons.logging.Log
logger
构造器概要
构造器 构造器 说明 JsrFaultTolerantChunkProcessor(ItemReader<? extends I> reader, ItemProcessor<? super I,? extends O> processor, ItemWriter<? super O> writer, RepeatOperations repeatTemplate, BatchRetryTemplate batchRetryTemplate)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
persist(StepContribution contribution, Chunk<O> chunk)
Adds retry and skip logic to the write phase of the chunk loop.protected I
provide(StepContribution contribution, Chunk<I> chunk)
Adds retry and skip logic to the reading phase of the chunk loop.void
registerListener(StepListener listener)
Register a listener for callbacks at the appropriate stages in a process.void
setChunkMonitor(ChunkMonitor chunkMonitor)
void
setListeners(java.util.List<? extends StepListener> listeners)
Register someStepListener
s with the handler.void
setRollbackClassifier(org.springframework.classify.Classifier<java.lang.Throwable,java.lang.Boolean> rollbackClassifier)
void
setSkipPolicy(SkipPolicy skipPolicy)
protected O
transform(StepContribution contribution, I item)
Adds retry and skip logic to the process phase of the chunk loop.从类继承的方法 org.springframework.batch.core.jsr.step.item.JsrChunkProcessor
doPersist, doProvide, doTransform, getListener, process
字段详细资料
logger
protected final org.apache.commons.logging.Log logger
构造器详细资料
JsrFaultTolerantChunkProcessor
public JsrFaultTolerantChunkProcessor(ItemReader<? extends I> reader, ItemProcessor<? super I,? extends O> processor, ItemWriter<? super O> writer, RepeatOperations repeatTemplate, BatchRetryTemplate batchRetryTemplate)
方法详细资料
setSkipPolicy
public void setSkipPolicy(SkipPolicy skipPolicy)
- 参数:
skipPolicy
- aSkipPolicy
setRollbackClassifier
public void setRollbackClassifier(org.springframework.classify.Classifier<java.lang.Throwable,java.lang.Boolean> rollbackClassifier)
- 参数:
rollbackClassifier
- aClassifier
setChunkMonitor
public void setChunkMonitor(ChunkMonitor chunkMonitor)
- 参数:
chunkMonitor
- aChunkMonitor
setListeners
public void setListeners(java.util.List<? extends StepListener> listeners)
Register someStepListener
s with the handler. Each will get the callbacks in the order specified at the correct stage.- 覆盖:
setListeners
在类中JsrChunkProcessor<I,O>
- 参数:
listeners
- listeners to be registered
registerListener
public void registerListener(StepListener listener)
Register a listener for callbacks at the appropriate stages in a process.- 覆盖:
registerListener
在类中JsrChunkProcessor<I,O>
- 参数:
listener
- aStepListener
provide
protected I provide(StepContribution contribution, Chunk<I> chunk) throws java.lang.Exception
Adds retry and skip logic to the reading phase of the chunk loop.- 覆盖:
provide
在类中JsrChunkProcessor<I,O>
- 参数:
contribution
- aStepContribution
chunk
- aChunk
- 返回:
- I an item
- 抛出:
java.lang.Exception
- thrown if error occurs.
transform
protected O transform(StepContribution contribution, I item) throws java.lang.Exception
Adds retry and skip logic to the process phase of the chunk loop.- 覆盖:
transform
在类中JsrChunkProcessor<I,O>
- 参数:
contribution
- aStepContribution
item
- an item to be processed- 返回:
- O an item that has been processed if a processor is available
- 抛出:
java.lang.Exception
- thrown if error occurs.
persist
protected void persist(StepContribution contribution, Chunk<O> chunk) throws java.lang.Exception
Adds retry and skip logic to the write phase of the chunk loop.- 覆盖:
persist
在类中JsrChunkProcessor<I,O>
- 参数:
contribution
- aStepContribution
chunk
- aChunk
- 抛出:
java.lang.Exception
- thrown if error occurs.