Class ExecutionQueue

java.lang.Object
com.inductiveautomation.sfc.api.ExecutionQueue

public class ExecutionQueue extends Object
Queues up submitted Runnables and executes them in serial on an ExecutorService.
  • Constructor Details

  • Method Details

    • beginTransaction

      public void beginTransaction()
      If multiple commands must be put on the queue in an atomic manner, use this to begin a transaction. All submissions will be queued in order with nothing else allowed until closeTransaction is called. Be sure to call closeTransaction in a finally block.
    • closeTransaction

      public void closeTransaction()
    • submit

      public void submit(Runnable runnable)
      Submit a Runnable to be executed.
      Parameters:
      runnable - the Runnable to be executed.
    • submit

      public void submit(Runnable runnable, String logMsg)
    • pause

      public void pause()
      Pause execution of queued Runnables.
    • resume

      public void resume()
      Resume execution of queued Runnables.