private void killCommandsAndFlush() { if (started.get()) { try { // Kill any remaining commands ... scheduler.killAll(); } finally { // Finally flush the data recorder ... dataRecorderDriver.flush(); } } }
private void doRestart() { if (started.get()) { // Kill any remaining commands ... scheduler.killAll(); } else { try { dataRecorderDriver.start(); } finally { try { strictExecutor.start(); } finally { try { dsPacketExecutor.start(); } finally { started.set(true); } } } } }
private void doShutdown() { try { // First stop executing immediately; at this point, no Executables // will run ... strictExecutor.stop(); } finally { try { dsPacketExecutor.stop(); } finally { try { // Kill any remaining commands ... scheduler.killAll(); } finally { try { // Finally flush the data recorder ... dataRecorderDriver.stop(); } finally { started.set(false); } } } } }