Node Director
|
Public Member Functions | |
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 | 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 |
void sfi.director.schedule.Scheduler.attach | ( | ) | throws DirectorException |
Start scheduler and attach it to the job queue.
Reimplemented in sfi.director.schedule.ParallelScheduler.
References sfi.director.util.Setup.hostname, sfi.director.util.Lock.Lock(), sfi.director.util.Setup.programid, and sfi.director.util.Lock.setOption().
Referenced by sfi.director.cli.queueworker.run().
void sfi.director.schedule.Scheduler.claimQueue | ( | int | timeout | ) | throws DirectorException |
References sfi.director.util.Lock.Lock().
void sfi.director.schedule.Scheduler.claimQueue | ( | ) | 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.
References sfi.director.util.Lock.unlock().
Referenced by sfi.director.cli.queueworker.run().
String sfi.director.schedule.Scheduler.dumpStatus | ( | ) |
Reimplemented in sfi.director.schedule.ParallelScheduler.
References sfi.director.schedule.Scheduler.getStatus().
Referenced by sfi.director.application.AdminServer.oneConnection().
|
protected |
Reimplemented in sfi.director.schedule.ParallelScheduler.
References sfi.director.util.Credentials.addRemoteHostPw(), sfi.director.repository.DBConnection.append(), sfi.director.util.Tools.debug(), com.graeff.pwencode.Base64.decodeToObject(), sfi.director.schedule.Scheduler.executeDSUpdate(), sfi.director.repository.DBObject.getAttribute(), sfi.director.repository.DBObject.getDN(), sfi.director.util.Options.getOption(), sfi.director.repository.DBObject.getValue(), sfi.director.util.Logger.INFO, sfi.director.util.Setup.jobqueuedb, sfi.director.util.Tools.log(), sfi.director.util.Logger.NOTICE, sfi.director.util.Setup.programid, sfi.director.repository.DBObject.removeAttribute(), and sfi.director.util.Logger.WARNING.
Referenced by sfi.director.schedule.Scheduler.runThroughCmdQueue().
|
protected |
References sfi.director.repository.DBObject.addUniqueAttribute(), sfi.director.util.Tools.debug(), sfi.director.schedule.Scheduler.executePendingDSUpdate(), sfi.director.repository.DBObject.getAttribute(), sfi.director.util.Options.getOption(), sfi.director.repository.DBObject.getValue(), sfi.director.repository.DBObject.removeAttribute(), and sfi.director.schedule.Scheduler.scheduleOptAttr.
Referenced by sfi.director.schedule.Scheduler.executeCmd().
synchronized void sfi.director.schedule.Scheduler.executePendingDSUpdate | ( | ) |
References sfi.director.application.objevents.Workflow.doEvent(), sfi.director.application.objevents.Workflow.flush(), sfi.director.repository.DBObject.getAttribute(), sfi.director.application.objevents.Workflow.getId(), sfi.director.application.objevents.Workflow.getStatus(), sfi.director.repository.DBObject.getValue(), sfi.director.util.Logger.INFO, sfi.director.util.Tools.log(), sfi.director.util.Setup.memorydb, sfi.director.util.Logger.NOTICE, sfi.director.repository.DBConnection.remove(), sfi.director.repository.DBConnection.replace(), sfi.director.repository.DBObject.setDN(), sfi.director.util.Tools.setThreadSubStatus(), sfi.director.util.Tools.uniqId(), and sfi.director.util.Logger.WARNING.
Referenced by sfi.director.schedule.Scheduler.executeDSUpdate(), and sfi.director.cli.queueworker.run().
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.
Referenced by sfi.director.jobs.JobMonitor.retrieveJob().
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.
References sfi.director.util.Options.getOption(), and sfi.director.schedule.Scheduler.getRunningSchedulerOpts().
Referenced by sfi.director.cli.serverstatus.run().
String sfi.director.schedule.Scheduler.getRunningSchedulerId | ( | ) | throws DirectorException |
retrieve the ID of a scheduler running on our cmd/job queue.
References sfi.director.util.Options.getOption(), and sfi.director.schedule.Scheduler.getRunningSchedulerOpts().
Referenced by sfi.director.schedule.Scheduler.isSchedulerRunning(), and sfi.director.schedule.Scheduler.scheduleShutdown().
Options sfi.director.schedule.Scheduler.getRunningSchedulerOpts | ( | ) | throws DirectorException |
retrieve the options of a scheduler running on our cmd/job queue.
References sfi.director.util.Lock.getOptions(), and sfi.director.util.Lock.inspect().
Referenced by sfi.director.schedule.Scheduler.getRunningSchedulerHost(), and sfi.director.schedule.Scheduler.getRunningSchedulerId().
String sfi.director.schedule.Scheduler.getStatus | ( | ) |
return human readable status information
Reimplemented in sfi.director.schedule.ParallelScheduler.
Referenced by sfi.director.schedule.Scheduler.dumpStatus(), and sfi.director.application.AdminServer.oneConnection().
void sfi.director.schedule.Scheduler.goThroughCmds | ( | ) | throws DirectorException |
Reimplemented in sfi.director.schedule.ParallelScheduler.
References sfi.director.schedule.Scheduler.claimQueue(), sfi.director.util.Setup.cmdqueuedb, sfi.director.util.Lock.Lock(), sfi.director.schedule.Scheduler.releaseQueue(), sfi.director.util.Setup.reqqueuedb, sfi.director.schedule.Scheduler.runThroughCmdQueue(), and sfi.director.util.Lock.unlock().
Referenced by sfi.director.schedule.Scheduler.rescan(), and sfi.director.cli.queueworker.run().
synchronized void sfi.director.schedule.Scheduler.goThroughQueue | ( | ) | throws DirectorException |
Reimplemented in sfi.director.schedule.ParallelScheduler.
References sfi.director.schedule.Scheduler.claimQueue(), sfi.director.schedule.Scheduler.releaseQueue(), and sfi.director.schedule.Scheduler.runThroughLockedQueue().
Referenced by sfi.director.schedule.Scheduler.rescan(), and sfi.director.cli.queueworker.run().
|
pure virtual |
Implemented in sfi.director.schedule.SimpleScheduler.
Referenced by sfi.director.util.Tools.executeLocalqueue(), and sfi.director.schedule.Scheduler.runThroughLockedQueue().
|
static |
References sfi.director.jobs.JobNode.getJob(), sfi.director.jobs.JobNode.getNext(), sfi.director.jobs.JobNode.getRecover(), and sfi.director.jobs.JobNode.getSub().
Referenced by sfi.director.schedule.ParallelScheduler.markHeads(), sfi.director.schedule.ParallelScheduler.removeOldJobs(), sfi.director.schedule.Scheduler.removeOldJobs(), and sfi.director.cli.queuestat.run().
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.
References sfi.director.schedule.Scheduler.getRunningSchedulerId().
Referenced by sfi.director.cli.shutdown.run().
boolean sfi.director.schedule.Scheduler.isShutdown | ( | ) |
ask if we are requested to shut down.
Referenced by sfi.director.cli.queueworker.run().
|
static |
void sfi.director.schedule.Scheduler.notifyServer | ( | ) | throws DirectorException |
References sfi.director.application.AdminServer.contactAdminServer(), sfi.director.util.MyProperties.getPropertyInteger(), sfi.director.util.Tools.log(), sfi.director.util.Setup.masterhost, sfi.director.util.Logger.NOTICE, and sfi.director.util.Setup.properties.
Referenced by sfi.director.schedule.Scheduler.scheduleJob(), sfi.director.schedule.Scheduler.scheduleRemoteHostPw(), and sfi.director.schedule.Scheduler.scheduleShutdown().
void sfi.director.schedule.Scheduler.purgeOldJobs | ( | ) | throws DirectorException |
References sfi.director.jobs.Job.getCreationTime(), sfi.director.jobs.Job.getId(), sfi.director.util.MyProperties.getPropertyInteger(), sfi.director.jobs.Job.Job(), sfi.director.util.Setup.jobarchivedb, sfi.director.util.Tools.log(), sfi.director.util.Setup.properties, sfi.director.repository.DBConnection.remove(), sfi.director.repository.DBConnection.search(), sfi.director.repository.DBObject.toLDIF(), sfi.director.util.Stub.unregister(), and sfi.director.repository.DBConnection.unwrap().
Referenced by sfi.director.cli.queueworker.run().
void sfi.director.schedule.Scheduler.releaseQueue | ( | ) | throws DirectorException |
void sfi.director.schedule.Scheduler.removeOldJobs | ( | ) | throws DirectorException |
Reimplemented in sfi.director.schedule.ParallelScheduler.
References sfi.director.jobs.JobStatus.aborted, sfi.director.schedule.Scheduler.claimQueue(), sfi.director.jobs.JobStatus.done, sfi.director.jobs.JobStatus.equals(), sfi.director.jobs.JobStatus.failed, 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.Setup.jobqueuedb, sfi.director.schedule.Scheduler.loadQueue(), sfi.director.util.Tools.log(), sfi.director.util.Setup.properties, and sfi.director.schedule.Scheduler.releaseQueue().
Referenced by sfi.director.cli.queueworker.run().
void sfi.director.schedule.Scheduler.rescan | ( | ) | throws DirectorException |
do a rescan of the job/cmd queues
References sfi.director.schedule.Scheduler.goThroughCmds(), sfi.director.schedule.Scheduler.goThroughQueue(), and sfi.director.util.Tools.setThreadSubStatus().
Referenced by sfi.director.application.AdminServer.oneConnection().
|
protected |
References sfi.director.schedule.Scheduler.executeCmd(), sfi.director.repository.DBObject.getDN(), sfi.director.util.DirectorException.isRetryable(), sfi.director.util.Tools.log(), and sfi.director.repository.DBConnection.unwrap().
Referenced by sfi.director.schedule.ParallelScheduler.goThroughCmds(), and sfi.director.schedule.Scheduler.goThroughCmds().
|
protected |
References sfi.director.jobs.Job.getId(), sfi.director.schedule.Scheduler.goThroughVector(), sfi.director.util.Setup.jobqueuedb, sfi.director.schedule.Scheduler.loadQueue(), sfi.director.util.Tools.log(), sfi.director.repository.DBConnection.replace(), and sfi.director.jobs.Job.todb().
Referenced by sfi.director.schedule.Scheduler.goThroughQueue().
void sfi.director.schedule.Scheduler.scheduleDSUpdate | ( | Enumeration | classes | ) | throws DirectorException |
void sfi.director.schedule.Scheduler.scheduleDSUpdate | ( | DBObject | dbo | ) | throws DirectorException |
void sfi.director.schedule.Scheduler.scheduleJob | ( | Job | job | ) | throws DirectorException |
void sfi.director.schedule.Scheduler.scheduleJob | ( | Enumeration | jobs | ) | throws DirectorException |
void sfi.director.schedule.Scheduler.scheduleRemoteHostPw | ( | String | login, |
String | pw | ||
) | throws DirectorException |
References sfi.director.schedule.Scheduler.notifyServer().
Referenced by sfi.director.application.FrontendHTTPServer.util_remotehostpw().
void sfi.director.schedule.Scheduler.scheduleShutdown | ( | ) | throws DirectorException |
References sfi.director.schedule.Scheduler.getRunningSchedulerId(), and sfi.director.schedule.Scheduler.notifyServer().
Referenced by sfi.director.cli.shutdown.run().
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
Referenced by sfi.director.application.SetPassword.setPasswordByFilter().
|
static |
Referenced by sfi.director.schedule.Scheduler.executeDSUpdate().