接口 StoppableTasklet
- 所有超级接口:
Tasklet
- 所有已知实现类:
BatchletAdapter
,SystemCommandTasklet
public interface StoppableTasklet extends Tasklet
An extension to theTasklet
interface to allow users to add logic for stopping a tasklet. It is up to each implementation as to how the stop will behave. The only guarantee provided by the framework is that a call toJobOperator.stop(long)
will attempt to call the stop method on any currently running StoppableTasklet. The call tostop()
will be from a thread other than the thread executingTasklet.execute(org.springframework.batch.core.StepContribution, org.springframework.batch.core.scope.context.ChunkContext)
so the appropriate thread safety and visibility controls should be put in place.- 从以下版本开始:
- 3.0
- 作者:
- Will Schipp