T - Submitted item type.public class SerialExecutionQueue<T>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SerialExecutionQueue.ExecutionCallback<T> |
static class |
SerialExecutionQueue.RunnableExecutor
An
SerialExecutionQueue.ExecutionCallback that executes Runnables. |
| Modifier and Type | Field and Description |
|---|---|
static SerialExecutionQueue.RunnableExecutor |
RUNNABLE_EXECUTOR |
| Constructor and Description |
|---|
SerialExecutionQueue(SerialExecutionQueue.ExecutionCallback<T> callback,
java.util.concurrent.ExecutorService service) |
| Modifier and Type | Method and Description |
|---|---|
static <T> SerialExecutionQueue.ExecutionCallback<T> |
noOpCallback() |
void |
pause()
Pause evaluation of items in the queue.
|
void |
resume()
Resume evaluation of items in the queue.
|
void |
submit(T item)
Submit an item to be delivered to the callback when it's time to execute.
|
void |
submitToHead(T item)
Submit an item at the head of the queue to be delivered to the callback when it's time to execute.
|
public static final SerialExecutionQueue.RunnableExecutor RUNNABLE_EXECUTOR
public SerialExecutionQueue(SerialExecutionQueue.ExecutionCallback<T> callback, java.util.concurrent.ExecutorService service)
public void submit(T item)
item - Item to be delivered.public void submitToHead(T item)
item - Item to be delivered.public void pause()
public void resume()
public static <T> SerialExecutionQueue.ExecutionCallback<T> noOpCallback()