Module g4ds.runtimecontroller
Runtime controlling - job recovering and resuming.
Grid for Digital Security (G4DS)
How to use the JobDispatcher:
There is a job which might take some time due to e.g. the requirement
of performing requests to other nodes. You need to put your job into a
seperate thread in order not to block the remaining system from its work.
However, your job has to be delayed until any reply has been received in
order to proceed.
In detail, the following steps have to be performed:
-
Call your (BIG) function in its seperate thread
-
Create a
JobLocker
instance from within your
function.
-
Register your function / joblocker with the JobDispatcher (
JobDispatcher.addJob
. This will
automatically lock your job.
As soon as a message arrives in G4DS, referencing your ID, the locker
is notified (waken up) and your function will proceed.
You may collect a message from the JobDispatcher, which was put there
by the G4DS communiction engine.
Author: Michael Pilgermann
Contact: mailto:mpilgerm@glam.ac.uk
License: GPL (General Public License)
Classes |
JobDispatcher |
Handles a list of jobs and locks as well as resumes there
processing. |
JobLocker |
Responsible for halting one particular job. |
JobStatus |
|
Function Summary |
|
getJobDispatcher()
|
JOB_ABORTED
-
- Type:
-
int
- Value:
|
JOB_FINISHED
-
- Type:
-
int
- Value:
|
JOB_FINISHED_WITH_ERROR
-
- Type:
-
int
- Value:
|
JOB_INITIALISED
-
- Type:
-
int
- Value:
|
JOB_UNINITIALISED
-
- Type:
-
int
- Value:
|