Class SerialExecutionQueue<T>
java.lang.Object
com.inductiveautomation.ignition.common.util.SerialExecutionQueue<T>
- Type Parameters:
T- Submitted item type.
Queues up submitted items and executes them in serial on an ExecutorService.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classAnSerialExecutionQueue.ExecutionCallbackthat executesRunnables. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSerialExecutionQueue(SerialExecutionQueue.ExecutionCallback<T> callback, ExecutorService service) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> SerialExecutionQueue.ExecutionCallback<T>voidpause()Pause evaluation of items in the queue.voidresume()Resume evaluation of items in the queue.intsize()voidSubmit an item to be delivered to the callback when it's time to execute.voidsubmitToHead(T item) Submit an item at the head of the queue to be delivered to the callback when it's time to execute.
-
Field Details
-
RUNNABLE_EXECUTOR
-
-
Constructor Details
-
SerialExecutionQueue
public SerialExecutionQueue(SerialExecutionQueue.ExecutionCallback<T> callback, ExecutorService service)
-
-
Method Details
-
submit
Submit an item to be delivered to the callback when it's time to execute.- Parameters:
item- Item to be delivered.
-
submitToHead
Submit an item at the head of the queue to be delivered to the callback when it's time to execute.- Parameters:
item- Item to be delivered.
-
pause
public void pause()Pause evaluation of items in the queue. -
resume
public void resume()Resume evaluation of items in the queue. -
size
public int size() -
noOpCallback
-