Package org.jppf.server.job
Interface JobManager
- All Known Implementing Classes:
JPPFPriorityQueue
public interface JobManager
Interface for job manager that handles states and monitor the jobs throughout their processing within the JPPF.
- Author:
- Martin JANDA
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddJobListener(org.jppf.job.JobManagerListener listener) Add a listener to the list of listeners.booleanCancel the job with the specified UUIDGet the set of all job ids.getBundleForJob(String jobUuid) Get the job for the job unique identifier.voidremoveJobListener(org.jppf.job.JobManagerListener listener) Remove a listener from the list of listeners.voidupdatePriority(String jobUuid, int newPriority) Update the priority of the job with the specified uuid.
-
Method Details
-
cancelJob
Cancel the job with the specified UUID- Parameters:
jobId- the uuid of the job to cancel.- Returns:
- whether cancellation was successful.
- Throws:
Exception- when unexpected error occurs.
-
addJobListener
void addJobListener(org.jppf.job.JobManagerListener listener) Add a listener to the list of listeners.- Parameters:
listener- the listener to add to the list.
-
removeJobListener
void removeJobListener(org.jppf.job.JobManagerListener listener) Remove a listener from the list of listeners.- Parameters:
listener- the listener to remove from the list.
-
getBundleForJob
Get the job for the job unique identifier.- Parameters:
jobUuid- the uuid of the job.- Returns:
- a
ServerJobinstance.
-
updatePriority
Update the priority of the job with the specified uuid.- Parameters:
jobUuid- the uuid of the job to re-prioritize.newPriority- the new priority of the job.
-
getAllJobIds
Get the set of all job ids.- Returns:
- the unmodifiable
Setof all job ids.
-