sfi.director.schedule.Scheduler Class Reference

Inheritance diagram for sfi.director.schedule.Scheduler:

sfi.director.schedule.SimpleScheduler sfi.director.schedule.ParallelScheduler List of all members.

Public Member Functions

void claimQueue (int timeout) throws DirectorException
void claimQueue () throws DirectorException
boolean isQueueMine ()
void releaseQueue () throws DirectorException
void notifyServer () throws DirectorException
void addCmd (DBObject cmd) throws DirectorException
void scheduleDSUpdate (Enumeration classes) throws DirectorException
void scheduleDSUpdate (DBObject dbo) throws DirectorException
void scheduleShutdown () throws DirectorException
void scheduleJob (Job job) throws DirectorException
void scheduleJob (Enumeration jobs) throws DirectorException
synchronized void executePendingDSUpdate ()
void goThroughCmds () throws DirectorException
void purgeOldJobs () throws DirectorException
void removeOldJobs () throws DirectorException
synchronized void goThroughQueue () throws DirectorException
abstract void goThroughVector (Vector jobs) throws DirectorException
void attach () throws DirectorException
 Start scheduler and attach it to the job queue.
synchronized void detach () throws DirectorException
 Stop scheduler and detach from the job queue.
Job getJob (String jobId)
 Get a pending job from the in-memory job queue.
Options getOptions ()
 get schedule options.
boolean isShutdown ()
 ask if we are requested to shut down.
boolean isSchedulerRunning () throws DirectorException
 ask if there is a scheduler running on our cmd/job queue.
Options getRunningSchedulerOpts () throws DirectorException
 retrieve the options of a scheduler running on our cmd/job queue.
String getRunningSchedulerId () throws DirectorException
 retrieve the ID of a scheduler running on our cmd/job queue.
String getRunningSchedulerHost () throws DirectorException
 retrieve the host of a scheduler running on our cmd/job queue.
void rescan () throws DirectorException
 do a rescan of the job/cmd queues
String getStatus ()
 return human readable status information
String dumpStatus ()
void setPriviledged (boolean priviledged)
 choose queue for the next addCmd() (schedule*()) invocation.

Static Public Member Functions

static Vector loadQueue (DBConnection queue) throws DirectorException
static Vector identifyHeads (Vector queue)

Static Public Attributes

final static String scheduleOptAttr = "sfijobschedule-option"

Protected Member Functions

void executeDSUpdate (DBObject cmd) throws DirectorException
void executeCmd (DBObject cmd, boolean priviledged) throws DirectorException
void runThroughCmdQueue (DBConnection db, boolean priviledged) throws DirectorException
void runThroughLockedQueue () throws DirectorException

Package Attributes

Lock queuelock = null
Lock schedulerLock = null
Options scheduleOptions = new Options()
boolean shutdownInprogress = false
boolean priviledgedQueue = true
DBObject pendingDSUpdate = null
DirectorThread DSThread = null

Member Function Documentation

void sfi.director.schedule.Scheduler.addCmd DBObject  cmd  )  throws DirectorException
 

void sfi.director.schedule.Scheduler.attach  )  throws DirectorException
 

Start scheduler and attach it to the job queue.

Reimplemented in sfi.director.schedule.ParallelScheduler.

void sfi.director.schedule.Scheduler.claimQueue  )  throws DirectorException
 

void sfi.director.schedule.Scheduler.claimQueue int  timeout  )  throws DirectorException
 

synchronized void sfi.director.schedule.Scheduler.detach  )  throws DirectorException
 

Stop scheduler and detach from the job queue.

Reimplemented in sfi.director.schedule.ParallelScheduler.

String sfi.director.schedule.Scheduler.dumpStatus  ) 
 

Reimplemented in sfi.director.schedule.ParallelScheduler.

void sfi.director.schedule.Scheduler.executeCmd DBObject  cmd,
boolean  priviledged
throws DirectorException [protected]
 

Reimplemented in sfi.director.schedule.ParallelScheduler.

void sfi.director.schedule.Scheduler.executeDSUpdate DBObject  cmd  )  throws DirectorException [protected]
 

synchronized void sfi.director.schedule.Scheduler.executePendingDSUpdate  ) 
 

Job sfi.director.schedule.Scheduler.getJob String  jobId  ) 
 

Get a pending job from the in-memory job queue.

If the job is not held in memory return null. This explicitly will not try to retrieve a job from the jobqueue database!

Reimplemented in sfi.director.schedule.ParallelScheduler.

Options sfi.director.schedule.Scheduler.getOptions  ) 
 

get schedule options.

The returned object may be manipulated by the caller.

String sfi.director.schedule.Scheduler.getRunningSchedulerHost  )  throws DirectorException
 

retrieve the host of a scheduler running on our cmd/job queue.

String sfi.director.schedule.Scheduler.getRunningSchedulerId  )  throws DirectorException
 

retrieve the ID of a scheduler running on our cmd/job queue.

Options sfi.director.schedule.Scheduler.getRunningSchedulerOpts  )  throws DirectorException
 

retrieve the options of a scheduler running on our cmd/job queue.

String sfi.director.schedule.Scheduler.getStatus  ) 
 

return human readable status information

Reimplemented in sfi.director.schedule.ParallelScheduler.

void sfi.director.schedule.Scheduler.goThroughCmds  )  throws DirectorException
 

Reimplemented in sfi.director.schedule.ParallelScheduler.

synchronized void sfi.director.schedule.Scheduler.goThroughQueue  )  throws DirectorException
 

Reimplemented in sfi.director.schedule.ParallelScheduler.

abstract void sfi.director.schedule.Scheduler.goThroughVector Vector  jobs  )  throws DirectorException [pure virtual]
 

Implemented in sfi.director.schedule.SimpleScheduler.

static Vector sfi.director.schedule.Scheduler.identifyHeads Vector  queue  )  [static]
 

boolean sfi.director.schedule.Scheduler.isQueueMine  ) 
 

boolean sfi.director.schedule.Scheduler.isSchedulerRunning  )  throws DirectorException
 

ask if there is a scheduler running on our cmd/job queue.

boolean sfi.director.schedule.Scheduler.isShutdown  ) 
 

ask if we are requested to shut down.

static Vector sfi.director.schedule.Scheduler.loadQueue DBConnection  queue  )  throws DirectorException [static]
 

void sfi.director.schedule.Scheduler.notifyServer  )  throws DirectorException
 

void sfi.director.schedule.Scheduler.purgeOldJobs  )  throws DirectorException
 

void sfi.director.schedule.Scheduler.releaseQueue  )  throws DirectorException
 

void sfi.director.schedule.Scheduler.removeOldJobs  )  throws DirectorException
 

Reimplemented in sfi.director.schedule.ParallelScheduler.

void sfi.director.schedule.Scheduler.rescan  )  throws DirectorException
 

do a rescan of the job/cmd queues

void sfi.director.schedule.Scheduler.runThroughCmdQueue DBConnection  db,
boolean  priviledged
throws DirectorException [protected]
 

void sfi.director.schedule.Scheduler.runThroughLockedQueue  )  throws DirectorException [protected]
 

void sfi.director.schedule.Scheduler.scheduleDSUpdate DBObject  dbo  )  throws DirectorException
 

void sfi.director.schedule.Scheduler.scheduleDSUpdate Enumeration  classes  )  throws DirectorException
 

void sfi.director.schedule.Scheduler.scheduleJob Enumeration  jobs  )  throws DirectorException
 

void sfi.director.schedule.Scheduler.scheduleJob Job  job  )  throws DirectorException
 

void sfi.director.schedule.Scheduler.scheduleShutdown  )  throws DirectorException
 

void sfi.director.schedule.Scheduler.setPriviledged boolean  priviledged  ) 
 

choose queue for the next addCmd() (schedule*()) invocation.

"true" selects the priviledged (cmd) queue, "false" the unpriviledged (request) queue


Member Data Documentation

DirectorThread sfi.director.schedule.Scheduler.DSThread = null [package]
 

DBObject sfi.director.schedule.Scheduler.pendingDSUpdate = null [package]
 

boolean sfi.director.schedule.Scheduler.priviledgedQueue = true [package]
 

Lock sfi.director.schedule.Scheduler.queuelock = null [package]
 

final static String sfi.director.schedule.Scheduler.scheduleOptAttr = "sfijobschedule-option" [static]
 

Options sfi.director.schedule.Scheduler.scheduleOptions = new Options() [package]
 

Lock sfi.director.schedule.Scheduler.schedulerLock = null [package]
 

boolean sfi.director.schedule.Scheduler.shutdownInprogress = false [package]
 


The documentation for this class was generated from the following file:
Generated on Sat May 19 01:19:59 2012 for Node Director by  doxygen 1.4.5