Package g4ds :: Module runtimecontroller
[show private | hide private]
[frames | no frames]

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:
  1. Call your (BIG) function in its seperate thread
  2. Create a JobLocker instance from within your function.
  3. 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()

Variable Summary
int JOB_ABORTED = 3                                                                     
int JOB_FINISHED = 2                                                                     
int JOB_FINISHED_WITH_ERROR = 4                                                                     
int JOB_INITIALISED = 1                                                                     
int JOB_UNINITIALISED = 0                                                                     

Variable Details

JOB_ABORTED

Type:
int
Value:
3                                                                     

JOB_FINISHED

Type:
int
Value:
2                                                                     

JOB_FINISHED_WITH_ERROR

Type:
int
Value:
4                                                                     

JOB_INITIALISED

Type:
int
Value:
1                                                                     

JOB_UNINITIALISED

Type:
int
Value:
0                                                                     

Generated by Epydoc 2.0 on Sat Oct 22 22:52:47 2005 http://epydoc.sf.net