Class SimulationExecutor

All Implemented Interfaces:
Runnable

public class SimulationExecutor extends PauseableThread
Executes a single simulation to completion under supervision by the monitor. The monitor
  • Constructor Details

  • Method Details

    • setup

      public void setup()
      Description copied from class: PauseableThread
      Run on thread once at the start. Can setup thread local resources. Constructor can be used to set up shared resources.
      Specified by:
      setup in class PauseableThread
    • doLoop

      public void doLoop()
      Description copied from class: PauseableThread
      Repeatedly called while the thread is not paused or halting. This can interact with resources shared with other threads but needs to be synchronised on them (or use non blocking). This operates equivalent to a `while (!isComplete()) {doLoop();}`
      Specified by:
      doLoop in class PauseableThread
    • isComplete

      public boolean isComplete()
      Description copied from class: PauseableThread
      Signify the thread loop is complete and proceed to shutdown. This is checked even if the thread is paused.
      Specified by:
      isComplete in class PauseableThread
    • shutdown

      public void shutdown(boolean completedNormally)
      Description copied from class: PauseableThread
      Shutdown the thread. This must close down any resources and exit without error.
      Specified by:
      shutdown in class PauseableThread
      Parameters:
      completedNormally - did the loop complete or was the thread halted?
    • status

      public String status()
      Overrides:
      status in class PauseableThread