public interface TaskScheduler
| Modifier and Type | Method and Description |
|---|---|
void |
add(TaskDescription task)
Adds a task to be scheduled.
|
boolean |
contains(UUID jobId,
int taskId)
Determines if the specified task exists.
|
TaskDescription |
get(UUID jobId,
int taskId)
Retrieves the specified task.
|
TaskDescription |
getNextTask()
Gets the next task to be served.
|
TaskDescription |
remove(UUID jobId,
int taskId)
Removes a task from the schedule.
|
void |
removeJob(UUID jobId)
Removes all tasks from the schedule that are associated with the
specified job.
|
void |
setJobPriority(UUID jobId,
int priority)
Sets the priority of a job.
|
void setJobPriority(UUID jobId, int priority)
jobId - The UUID identifying the job for which to set
the priority.priority - The priority to set for the specified job.void add(TaskDescription task)
task - An TaskDescription describing the task to be
performed.TaskDescription remove(UUID jobId, int taskId)
jobId - The UUID identifying the job associated with
the task to be removed.taskId - The identifier for the task to be removed.TaskDescription describing the specified task.TaskDescription get(UUID jobId, int taskId)
jobId - The UUID identifying the job associated with
the task to retrieve.taskId - The identifier for the task to be retrieved.TaskDescription describing the specified task,
or null if no such task exists.boolean contains(UUID jobId, int taskId)
jobId - The UUID identifying the job associated with
the task to retrieve.taskId - The identifier for the task to be retrieved.TaskDescription getNextTask()
TaskDescription describing the next task to be
served.TaskDescriptionvoid removeJob(UUID jobId)
jobId - The UUID identifying the job for which all
tasks are to be removed.Copyright © 2016. All rights reserved.