Package com.inductiveautomation.sfc.api
Class ExecutionQueue
java.lang.Object
com.inductiveautomation.sfc.api.ExecutionQueue
Queues up submitted
Runnable
s and executes them in serial on an
ExecutorService
.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionExecutionQueue
(ExecutorService service, MDCUtils.MDCDetails logDetails) ExecutionQueue
(ExecutorService service, MDCUtils.MDCDetails logDetails, String identId) -
Method Summary
-
Constructor Details
-
ExecutionQueue
-
ExecutionQueue
-
-
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
Submit aRunnable
to be executed.- Parameters:
runnable
- theRunnable
to be executed.
-
submit
-
pause
public void pause()Pause execution of queuedRunnable
s. -
resume
public void resume()Resume execution of queuedRunnable
s.
-