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);
}
Aggregations