use of abs.backend.java.scheduling.TotalSchedulingStrategy in project abstools by abstools.
the class SchedulingStrategy method resumeAutomaticScheduling.
/**
* resumes the scheduling with the current base scheduler (Interrupts the
* GUIScheduler if it is the current scheduler)
*/
public synchronized void resumeAutomaticScheduling() {
TotalSchedulingStrategy oldScheduler = curScheduler;
baseScheduler.reset();
curScheduler = baseScheduler;
disableHighlighting();
schedulerUpdated(oldScheduler);
}
use of abs.backend.java.scheduling.TotalSchedulingStrategy in project abstools by abstools.
the class Debugger method addSchedulingStrategy.
private static boolean addSchedulingStrategy(String debuggerArgsScheduler, final ABSRuntime r) {
if (debuggerArgsScheduler != null && !debuggerArgsScheduler.isEmpty()) {
String scheduler = debuggerArgsScheduler.replaceFirst("-Dabs.totalscheduler=", "");
if (!scheduler.isEmpty()) {
try {
Class<?> c = Class.forName(scheduler);
Object o = c.newInstance();
TotalSchedulingStrategy ss = (TotalSchedulingStrategy) o;
r.setTotalSchedulingStrategy(ss);
return (ss instanceof SchedulingStrategy);
} catch (ClassNotFoundException e) {
standardExceptionHandling(e);
showErrorMessage("Not able to instantiate total scheduler");
} catch (InstantiationException e) {
standardExceptionHandling(e);
showErrorMessage("Not able to instantiate total scheduler");
} catch (IllegalAccessException e) {
standardExceptionHandling(e);
showErrorMessage("Not able to instantiate total scheduler");
}
}
}
return false;
}
use of abs.backend.java.scheduling.TotalSchedulingStrategy in project abstools by abstools.
the class SchedulingStrategy method setCurrentScheduler.
/**
* Sets the current scheduler. If the old scheduler is the GUIScheduler, it is interrupted
* and notified about the changed scheduler.
* @param scheduler
*/
public synchronized void setCurrentScheduler(TotalScheduler scheduler) {
if (random != null && scheduler instanceof UsesRandomSeed) {
((UsesRandomSeed) scheduler).setRandom(random);
}
TotalSchedulingStrategy oldscheduler = curScheduler;
curScheduler = scheduler;
schedulerUpdated(oldscheduler);
}
Aggregations