Class ThreadStepInterruptionPolicy
- java.lang.Object
- org.springframework.batch.core.step.ThreadStepInterruptionPolicy
- All Implemented Interfaces:
StepInterruptionPolicy
public class ThreadStepInterruptionPolicy extends java.lang.Object implements StepInterruptionPolicy
Policy that checks the current thread to see if it has been interrupted.- Author:
- Lucas Ward, Dave Syer
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Log
logger
Constructor Summary
Constructors Constructor Description ThreadStepInterruptionPolicy()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkInterrupted(StepExecution stepExecution)
Returns if the current job lifecycle has been interrupted by checking if the current thread is interrupted.
Method Detail
checkInterrupted
public void checkInterrupted(StepExecution stepExecution) throws JobInterruptedException
Returns if the current job lifecycle has been interrupted by checking if the current thread is interrupted.- Specified by:
checkInterrupted
in interfaceStepInterruptionPolicy
- Parameters:
stepExecution
- the current context of the running step.- Throws:
JobInterruptedException
- when the job has been interrupted.