Ejemplo n.º 1
0
 private void killCommandsAndFlush() {
   if (started.get()) {
     try {
       // Kill any remaining commands ...
       scheduler.killAll();
     } finally {
       // Finally flush the data recorder ...
       dataRecorderDriver.flush();
     }
   }
 }
Ejemplo n.º 2
0
 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);
         }
       }
     }
   }
 }
Ejemplo n.º 3
0
 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);
         }
       }
     }
   }
 }