|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.JobQueueManager
public final class JobQueueManager
This class manages instances of job queue classes.
| Constructor Summary | |
|---|---|
protected |
JobQueueManager()
JobQueueManager default constructor. |
| Method Summary | |
|---|---|
static void |
addAbortedJobId(int jobId)
Add job id to the aborted job id list. |
void |
addJob(JobData jobData,
ManageableJobQueueReadOnlyInterface jobQueueReadOnly)
Add a job to a specific job queue. |
void |
addPluginExecutionRequest(int jobId,
PluginExecutionRequest exec)
Add PluginExecutionRequest entry for job specified by id. |
void |
addThread(int jobId,
Thread thread)
Add Thread entry for job specified by id. |
protected boolean |
allQueuesEmpty()
Checks if all queues are empty. |
static AbortableJobQueueReadOnlyInterface |
getAbortableJobQueue(int jobId)
Get a read-only copy of the abortable job queue for a job with specific id. |
static ManageableJobQueueReadOnlyInterface |
getJobQueue(int jobId)
Get a read-only copy of the job queue for a job with specific id. |
static List<ManageableJobQueueReadOnlyInterface> |
getJobQueueList()
Get a copy of the job queue list, with ManageableJobQueueReadOnlyInterface elements. |
List<Integer> |
getJobsStoppedByServerShutdownList()
Gets id values of Jobs with status EXECUTING or ABORTING that do not belong to a queue, and therefore are remnants left from a server shutdown. |
static int |
getNumInternalJobQueues()
Get the number of internal job queues. |
List<JobData> |
getPendingJobsList()
Gets list of JobData for jobs with no end time set. |
static boolean |
isRunning()
Check if the job queue manager is running. |
boolean |
isRunningJobInBlockerChain(Job job)
Check if a running job exists in the blocker chain for a job. |
static int |
numberOfJobsInJobQueue(String jobQueueDescription)
Get number of jobs in job queue specified by description. |
protected JobData |
pollNextJob(ManageableJobQueueReadOnlyInterface jobQueueReadOnly)
Retrieves next (first) job in queue and removes it from the queue. |
protected void |
populateQueue(ManageableJobQueueInterface jobQueue)
Populate an empty job queue with waiting jobs. |
protected void |
populateQueues()
Checks if there are any jobs to be loaded in empty job queues. |
List<JobData> |
putJobInHighPriorityQueue(Job job)
Put job and its non-finished blocker jobs in high priority job queue. |
static void |
putManageableJobQueueEntry(int jobId,
ManageableJobQueueInterface manageableJobQueue)
Put entry on the job id, manageable job queue hash map. |
static void |
removeAbortedJobId(int jobId)
Remove job id from the aborted job id list. |
static void |
removeManageableJobQueueEntry(int jobId)
Remove entry from the job id, manageable job queue hash map. |
void |
removePluginExecutionRequest(int jobId)
Remove PluginExecutionRequest entry for job specified by id. |
void |
removeThread(int jobId)
Remove Thread entry for job specified by id. |
protected void |
start()
Starts the job queue manager. |
protected void |
stop()
Stops the job queue manager. |
protected void |
updateStatusForAbortedJobsInQueue(ManageableJobQueueReadOnlyInterface jobQueueReadOnly)
Updates abort status for jobs in a job queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected JobQueueManager()
| Method Detail |
|---|
public static int getNumInternalJobQueues()
public static List<ManageableJobQueueReadOnlyInterface> getJobQueueList()
public static void putManageableJobQueueEntry(int jobId,
ManageableJobQueueInterface manageableJobQueue)
jobId - int The job id.manageableJobQueue - The manageable job queue.public static void removeManageableJobQueueEntry(int jobId)
jobId - int The job id.public static ManageableJobQueueReadOnlyInterface getJobQueue(int jobId)
jobId - int The job id.
public static AbortableJobQueueReadOnlyInterface getAbortableJobQueue(int jobId)
jobId - int The job id.
public static int numberOfJobsInJobQueue(String jobQueueDescription)
jobQueueDescription - String Description defining job queue.
public void addJob(JobData jobData,
ManageableJobQueueReadOnlyInterface jobQueueReadOnly)
jobData - JobData The job data.jobQueueReadOnly - ManageableJobQueueReadOnlyInterface The manageable job queue.public static void addAbortedJobId(int jobId)
jobId - The job id to add to the aborted job id list.public static void removeAbortedJobId(int jobId)
jobId - int The job id to remove from the aborted job id list.
public void addPluginExecutionRequest(int jobId,
PluginExecutionRequest exec)
jobId - The job id.exec - The PluginExecutionRequest.public void removePluginExecutionRequest(int jobId)
jobId - The job id.
public void addThread(int jobId,
Thread thread)
jobId - The job id.thread - The thread.public void removeThread(int jobId)
jobId - The job id.public static boolean isRunning()
start(),
stop()
protected void start()
throws BaseException
BaseException - If the job queue manager cannot be started
protected void stop()
throws BaseException
BaseException - If the job queue manager cannot be stopped.start(),
isRunning()protected boolean allQueuesEmpty()
protected void populateQueues()
protected void populateQueue(ManageableJobQueueInterface jobQueue)
jobQueue - ManageableJobQueueInterface The job queue to populate.public List<JobData> putJobInHighPriorityQueue(Job job)
job - Job The job to put in a queue.
protected void updateStatusForAbortedJobsInQueue(ManageableJobQueueReadOnlyInterface jobQueueReadOnly)
jobQueueReadOnly - ManageableJobQueueReadOnlyInterface The job queue to update the jobs' abort status for.protected JobData pollNextJob(ManageableJobQueueReadOnlyInterface jobQueueReadOnly)
jobQueueReadOnly - ManageableJobQueueReadOnlyInterface The job queue to update the jobs' abort status for.
public List<Integer> getJobsStoppedByServerShutdownList()
public List<JobData> getPendingJobsList()
public boolean isRunningJobInBlockerChain(Job job)
job - Job The job to be checked.
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||