Interface StoppableTasklet

All Superinterfaces:
Tasklet
All Known Implementing Classes:
SystemCommandTasklet

public interface StoppableTasklet extends Tasklet
An extension to the Tasklet 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 to JobOperator.stop(long) will attempt to call the stop method on any currently running StoppableTasklet. The call to stop() will be from a thread other than the thread executing Tasklet.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.
Since:
3.0
Author:
Will Schipp
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Used to signal that the job this Tasklet is executing within has been requested to stop.

    Methods inherited from interface org.springframework.batch.core.step.tasklet.Tasklet

    execute
  • Method Details

    • stop

      void stop()
      Used to signal that the job this Tasklet is executing within has been requested to stop.