Class ThreadStepInterruptionPolicy
java.lang.Object
org.springframework.batch.core.step.ThreadStepInterruptionPolicy
- All Implemented Interfaces:
StepInterruptionPolicy
Policy that checks the current thread to see if it has been interrupted.
- Author:
- Lucas Ward, Dave Syer
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkInterrupted
(StepExecution stepExecution) Returns if the current job lifecycle has been interrupted by checking if the current thread is interrupted.
-
Field Details
-
logger
protected static final org.apache.commons.logging.Log logger
-
-
Constructor Details
-
ThreadStepInterruptionPolicy
public ThreadStepInterruptionPolicy()
-
-
Method Details
-
checkInterrupted
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.
-