Node Director
|
Classes | |
class | encapsulatedInt |
class | ExecutorThread |
Public Member Functions | |
void | ParallelScheduler () |
synchronized 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. | |
synchronized void | goThroughCmds () throws DirectorException |
synchronized void | removeOldJobs () throws DirectorException |
synchronized void | goThroughQueue () throws DirectorException |
Job | getJob (String id) |
Get a pending job from the in-memory job queue. | |
String | getStatus () |
return human readable status information | |
String | dumpStatus () |
Public Member Functions inherited from sfi.director.schedule.SimpleScheduler | |
void | SimpleScheduler () |
void | goThroughVector (Vector jobqueue) throws DirectorException |
Public Member Functions inherited from sfi.director.schedule.Scheduler | |
void | claimQueue (int timeout) throws DirectorException |
void | claimQueue () throws DirectorException |
boolean | isQueueMine () |
void | releaseQueue () throws DirectorException |
void | notifyServer () throws DirectorException |
void | scheduleDSUpdate (Enumeration classes) throws DirectorException |
void | scheduleDSUpdate (DBObject dbo) throws DirectorException |
void | scheduleShutdown () throws DirectorException |
void | scheduleRemoteHostPw (String login, String pw) throws DirectorException |
void | scheduleJob (Job job) throws DirectorException |
void | scheduleJob (Enumeration jobs) throws DirectorException |
synchronized void | executePendingDSUpdate () |
void | purgeOldJobs () throws DirectorException |
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 | |
void | setPriviledged (boolean priviledged) |
choose queue for the next addCmd() (schedule*()) invocation. |
Protected Member Functions | |
void | saveQueue () |
void | finalize () |
synchronized void | executeCmd (DBObject cmd, boolean priviledged) throws DirectorException |
void | markHeads (int from) |
go through structure of newly loaded jobs and mark head jobs | |
void | parallelizedExec () |
Additional Inherited Members | |
Static Public Member Functions inherited from sfi.director.schedule.Scheduler | |
static Vector | loadQueue (DBConnection queue) throws DirectorException |
static Vector | identifyHeads (Vector queue) |
Static Public Attributes inherited from sfi.director.schedule.Scheduler | |
final static String | scheduleOptAttr = "sfijobschedule-option" |
void sfi.director.schedule.ParallelScheduler.ParallelScheduler | ( | ) |
synchronized void sfi.director.schedule.ParallelScheduler.attach | ( | ) | throws DirectorException |
Start scheduler and attach it to the job queue.
Reimplemented from sfi.director.schedule.Scheduler.
References sfi.director.repository.DBSet.add(), sfi.director.schedule.Scheduler.claimQueue(), sfi.director.util.Tools.debug(), sfi.director.jobs.Job.getId(), sfi.director.util.Setup.jobqueuedb, sfi.director.schedule.Scheduler.loadQueue(), and sfi.director.jobs.Job.todb().
synchronized void sfi.director.schedule.ParallelScheduler.detach | ( | ) | throws DirectorException |
Stop scheduler and detach from the job queue.
Reimplemented from sfi.director.schedule.Scheduler.
References sfi.director.util.Tools.log(), sfi.director.schedule.Scheduler.releaseQueue(), sfi.director.schedule.ParallelScheduler.saveQueue(), sfi.director.util.StoppableThread.stopGracefully(), and sfi.director.util.Logger.WARNING.
Referenced by sfi.director.schedule.ParallelScheduler.finalize().
String sfi.director.schedule.ParallelScheduler.dumpStatus | ( | ) |
|
protected |
Reimplemented from sfi.director.schedule.Scheduler.
References sfi.director.repository.DBSet.add(), sfi.director.repository.DBConnection.append(), sfi.director.util.Tools.debug(), sfi.director.util.Logger.ERR, sfi.director.jobs.Job.getId(), sfi.director.jobs.Job.Job(), sfi.director.util.Setup.jobqueuedb, sfi.director.util.Tools.log(), and sfi.director.util.Logger.WARNING.
|
protected |
Job sfi.director.schedule.ParallelScheduler.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 from sfi.director.schedule.Scheduler.
String sfi.director.schedule.ParallelScheduler.getStatus | ( | ) |
return human readable status information
Reimplemented from sfi.director.schedule.Scheduler.
References sfi.director.jobs.Job.getDescr(), sfi.director.jobs.RemoteJob.getHost(), sfi.director.jobs.Job.getId(), and sfi.director.jobs.Job.getName().
Referenced by sfi.director.schedule.ParallelScheduler.dumpStatus().
synchronized void sfi.director.schedule.ParallelScheduler.goThroughCmds | ( | ) | throws DirectorException |
Reimplemented from sfi.director.schedule.Scheduler.
References sfi.director.util.Setup.cmdqueuedb, sfi.director.util.Lock.Lock(), sfi.director.schedule.ParallelScheduler.markHeads(), sfi.director.util.Setup.reqqueuedb, sfi.director.schedule.Scheduler.runThroughCmdQueue(), sfi.director.schedule.ParallelScheduler.saveQueue(), sfi.director.repository.DBConnection.search(), sfi.director.util.Tools.setThreadSubStatus(), sfi.director.util.Lock.unlock(), and sfi.director.repository.DBConnection.unwrap().
synchronized void sfi.director.schedule.ParallelScheduler.goThroughQueue | ( | ) | throws DirectorException |
|
protected |
go through structure of newly loaded jobs and mark head jobs
References sfi.director.jobs.Job.getDescr(), sfi.director.schedule.Scheduler.identifyHeads(), sfi.director.jobs.JobNode.log(), sfi.director.util.Logger.NOTICE, and sfi.director.jobs.JobNode.setHead().
Referenced by sfi.director.schedule.ParallelScheduler.goThroughCmds().
|
protected |
References sfi.director.util.Tools.debug(), sfi.director.jobs.JobStatus.equals(), sfi.director.util.MyProperties.getPropertyInteger(), sfi.director.jobs.Job.getScheduleOption(), sfi.director.jobs.Job.getStatus(), sfi.director.util.Logger.INFO, sfi.director.util.StoppableThread.keeprunning, sfi.director.util.Tools.log(), sfi.director.util.Setup.properties, sfi.director.jobs.JobStatus.runnable, sfi.director.schedule.ParallelScheduler.saveQueue(), and sfi.director.util.Logger.WARNING.
Referenced by sfi.director.schedule.ParallelScheduler.goThroughQueue().
synchronized void sfi.director.schedule.ParallelScheduler.removeOldJobs | ( | ) | throws DirectorException |
Reimplemented from sfi.director.schedule.Scheduler.
References sfi.director.jobs.Job.getCreationTime(), sfi.director.jobs.Job.getId(), sfi.director.util.MyProperties.getPropertyInteger(), sfi.director.jobs.Job.getScheduleOption(), sfi.director.jobs.Job.getStatus(), sfi.director.schedule.Scheduler.identifyHeads(), sfi.director.util.Logger.INFO, sfi.director.jobs.JobStatus.isFinal(), sfi.director.util.Tools.log(), and sfi.director.util.Setup.properties.
|
protected |
References sfi.director.util.Tools.debug(), sfi.director.repository.DBObject.diffAttributes(), sfi.director.repository.DBSet.get(), sfi.director.repository.DBObject.getDN(), sfi.director.jobs.Job.getId(), sfi.director.util.Setup.jobqueuedb, sfi.director.util.Tools.log(), sfi.director.repository.DBSet.replace(), sfi.director.repository.DBConnection.replace(), sfi.director.util.Tools.setThreadSubStatus(), sfi.director.jobs.Job.todb(), sfi.director.repository.DBObject.toLDIF(), and sfi.director.util.Logger.WARNING.
Referenced by sfi.director.schedule.ParallelScheduler.detach(), sfi.director.schedule.ParallelScheduler.goThroughCmds(), and sfi.director.schedule.ParallelScheduler.parallelizedExec().