Interface ITaskPlanner
- All Known Implementing Classes:
FIFOTaskPlanner
public interface ITaskPlanner
ITaskPlanner provides an interface to program your own task planning. It gives
you operations for pick a task from the queue according on the criteria that
you designed.
The simplest implementation of ITaskPlanner would be a FIFO task planner (see FIFOTaskPlanner.java) which takes jobs from a task queue in the same order they were put. But any kind of planner is possible (SJF, LIFO, RoundRobin, etc.).
- Author:
- jaume dominguez faus - jaume.dominguez@iver.es
-
Method Summary
Modifier and TypeMethodDescriptionnextTask()Takes the next task to be executed.Takes the previous executed task.
-
Method Details
-
nextTask
IRunnableTask nextTask()Takes the next task to be executed.- Returns:
- IRunnableTask representing the next task to be executed
-
previousTask
IRunnableTask previousTask()Takes the previous executed task. Notice that it may or may not have sense for specific implementations. For example, in a FIFO-like planner, the task is taken from the queue, executed until it is finished and removed from the queue. So, there is no previous task.- Returns:
- IRunnableTask representing the previous executed task, or null if none.
-