public interface Job
Modifier and Type | Method and Description |
---|---|
JobStatus |
getStatus()
Returns the current job status.This method is called by the Job Manager which runs in a
different thread.
|
void |
run()
Starts the job.
|
void |
stop()
Requests the job to stop.
|
void run()
void stop()
The implementation is assumed to set the internal flag, in a thread-safe manner. The run() method implementation is assumed to check the flag periodically, between units of work.
If the job does not stop after configurable time interval, the Job Manager may terminate the job thread.
JobStatus getStatus()
The status object is owned by the job implementation. The run() method should update the status object in a thread-safe manner.