| java.lang.Object org.cougaar.logistics.plugin.utils.TaskSchedulingPolicy
TaskSchedulingPolicy | public class TaskSchedulingPolicy (Code) | | A TaskSchedulingPolicy instance prioritizes tasks as to which
should be scheduled first.
There are n priority levels, each with an accompanying predicate/test
that tells whether a task is at that priority level.
If a task matches the predicate for more than one level, it is
assigned the highest level.
Note that the highest level corresponds to the lowest number (e.g.,
priority 0 is the highest priority and should be scheduled first).
A TaskSchedulingPolicy also can contain a sequence of time phases.
This specified how to break a task into different time periods without
actually expanding the task, hence allowing a plugin to handle
particular time periods before others.
|
Inner Class :public static interface Predicate | |
Inner Class :public static class PriorityPhaseMix | |
Inner Class :public static class Level2Predicate implements Predicate | |
Inner Class :public static class TimeSpanPredicate implements Predicate | |
Constructor Summary | |
public | TaskSchedulingPolicy(Predicate[] priorityTests) Constructor when using just priorities and not phases
Parameters: priorityTests - A set of tests that determines what prioritya given task is. | public | TaskSchedulingPolicy(TimeSpan[] phases) | public | TaskSchedulingPolicy(Predicate[] priorityTests, PriorityPhaseMix[] ordering) |
PASSALL | public static Predicate PASSALL(Code) | | Predicate that lets everything pass
|
UNKNOWN_PRIORITY | final public static int UNKNOWN_PRIORITY(Code) | | |
TaskSchedulingPolicy | public TaskSchedulingPolicy(Predicate[] priorityTests)(Code) | | Constructor when using just priorities and not phases
Parameters: priorityTests - A set of tests that determines what prioritya given task is. If a task passes the test in the ithentry of the array but not previous test, then the task isof priority i. |
TaskSchedulingPolicy | public TaskSchedulingPolicy(TimeSpan[] phases)(Code) | | Constructor when using just phases and not priorities
Parameters: phases - A set of time intervals in order of how to handle |
TaskSchedulingPolicy | public TaskSchedulingPolicy(Predicate[] priorityTests, PriorityPhaseMix[] ordering)(Code) | | Constructor specifying both priorities and phases
|
getOrdering | public PriorityPhaseMix[] getOrdering()(Code) | | |
isPriority | public boolean isPriority(int priority, Task task)(Code) | | |
makeTimeSpan | public static TimeSpan makeTimeSpan(long start, long end)(Code) | | Get a time span object
|
numPhases | public int numPhases(int priority)(Code) | | number of different phases for a particular priority
|
numPriorities | public int numPriorities()(Code) | | number of different priorities
|
taskPriority | public int taskPriority(Task task)(Code) | | |
|
|