public class RunnableQueue
extends java.lang.Object
| Constructor and Description |
|---|
RunnableQueue(java.util.concurrent.ExecutorService executorService,
int id)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(java.lang.Runnable runnable)
Add a new runnable to the queue.
|
void |
terminate()
Terminate the queue's execution.
|
public RunnableQueue(java.util.concurrent.ExecutorService executorService,
int id)
executorService - executor service to submit requests to when there
aren't any runningpublic void execute(java.lang.Runnable runnable)
runnable - the runnable to executepublic void terminate()