Package org.knowm.sundial
Class JobContainer
java.lang.Object
org.knowm.sundial.JobContainer
The highest class of the Job hierarchy which contains the ThreadLocal instance, the JobContext,
and handles terminating of Jobs.
- Author:
- timmolter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCheck if the terminate flag is true, and throw a JobInterruptException if it is.protected voidEmpty the ThreadLocal containerprotected JobContextGet the JobContext objectprotected voidinitContextContainer(JobExecutionContext jobExecutionContext) Initialize the ThreadLocal with a JobExecutionContext objectprotected voidSet the terminate flag to true.
-
Constructor Details
-
JobContainer
public JobContainer()
-
-
Method Details
-
initContextContainer
Initialize the ThreadLocal with a JobExecutionContext object- Parameters:
jobExecutionContext-
-
destroyContext
protected void destroyContext()Empty the ThreadLocal container -
getJobContext
Get the JobContext object- Returns:
-
checkTerminated
public void checkTerminated()Check if the terminate flag is true, and throw a JobInterruptException if it is. -
setTerminate
protected void setTerminate()Set the terminate flag to true. Client code should not call this.
-