Search in sources :

Example 1 with ScheduleTask

use of abs.backend.java.scheduling.ScheduleTask in project abstools by abstools.

the class RunTaskScheduler method choose.

@Override
public ScheduleAction choose(ScheduleOptions options) {
    List<ScheduleAction> schedulableActions = options.allOptions();
    boolean isEqual = false;
    if (doSchedule && this.schedulingStrategy.schedulableTasks.contains(task)) {
        for (ScheduleAction action : schedulableActions) {
            if (action instanceof ScheduleTask) {
                isEqual = (action.getCOG().getID() == task.getCOG().getID());
            } else {
                isEqual = (action.getTask().getID() == task.getID());
            }
            doSchedule = false;
            if (isEqual) {
                return action;
            }
        }
    } else {
        for (ScheduleAction action : schedulableActions) {
            if (!(action instanceof ScheduleTask) && (action.getTask().getID() == task.getID())) {
                return action;
            }
        }
    }
    return this.schedulingStrategy.awaitGUIAction(options);
}
Also used : ScheduleAction(abs.backend.java.scheduling.ScheduleAction) ScheduleTask(abs.backend.java.scheduling.ScheduleTask)

Aggregations

ScheduleAction (abs.backend.java.scheduling.ScheduleAction)1 ScheduleTask (abs.backend.java.scheduling.ScheduleTask)1