org.springframework.batch.core.step
Class ThreadStepInterruptionPolicy
java.lang.Object
org.springframework.batch.core.step.ThreadStepInterruptionPolicy
- All Implemented Interfaces:
- StepInterruptionPolicy
public class ThreadStepInterruptionPolicy
- extends Object
- implements StepInterruptionPolicy
Policy that checks the current thread to see if it has been interrupted.
- Author:
- Lucas Ward, Dave Syer
Field Summary |
protected static org.apache.commons.logging.Log |
logger
|
Method Summary |
void |
checkInterrupted(StepExecution stepExecution)
Returns if the current job lifecycle has been interrupted by checking if
the current thread is interrupted. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.apache.commons.logging.Log logger
ThreadStepInterruptionPolicy
public ThreadStepInterruptionPolicy()
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 interface StepInterruptionPolicy
- Parameters:
stepExecution
- the current context of the running step.
- Throws:
JobInterruptedException
- when the job has been interrupted.
Copyright © 2008 SpringSource. All Rights Reserved.