接口 Tasklet
- 所有已知子接口:
StoppableTasklet
- 所有已知实现类:
BatchletAdapter
,CallableTaskletAdapter
,ChunkOrientedTasklet
,JsrSampleTasklet
,MethodInvokingTaskletAdapter
,SleepingTasklet
,SystemCommandTasklet
public interface Tasklet
Strategy for processing in a step.- 作者:
- Dave Syer, Mahmoud Ben Hassine
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 RepeatStatus
execute(StepContribution contribution, ChunkContext chunkContext)
Given the current context in the form of a step contribution, do whatever is necessary to process this unit inside a transaction.
方法详细资料
execute
@Nullable RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws java.lang.Exception
Given the current context in the form of a step contribution, do whatever is necessary to process this unit inside a transaction. Implementations returnRepeatStatus.FINISHED
if finished. If not they returnRepeatStatus.CONTINUABLE
. On failure throws an exception.- 参数:
contribution
- mutable state to be passed back to update the current step executionchunkContext
- attributes shared between invocations but not between restarts- 返回:
- an
RepeatStatus
indicating whether processing is continuable. Returningnull
is interpreted asRepeatStatus.FINISHED
- 抛出:
java.lang.Exception
- thrown if error occurs during execution.