|
The Meta-Environment API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttoolbus.AbstractTool.WorkerQueue
private static class AbstractTool.WorkerQueue
The queue that is meant to take care of the asynchroneous execution and queueing of anything that invokes stuff on a tool.
| Nested Class Summary | |
|---|---|
private class |
AbstractTool.WorkerQueue.Worker
The worker thread of this queue. |
| Field Summary | |
|---|---|
private java.lang.Object |
lock
|
private java.util.Queue<java.lang.Runnable> |
queue
|
private AbstractTool.WorkerQueue.Worker |
worker
|
| Constructor Summary | |
|---|---|
AbstractTool.WorkerQueue()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
execute(java.lang.Runnable r)
Executes or queues the given runnable for execution. |
void |
start()
Starts the worker thread. |
void |
terminate()
Terminates the worker thread as soon as is gracefully possible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.lang.Object lock
private final java.util.Queue<java.lang.Runnable> queue
private final AbstractTool.WorkerQueue.Worker worker
| Constructor Detail |
|---|
public AbstractTool.WorkerQueue()
| Method Detail |
|---|
public void start()
public void execute(java.lang.Runnable r)
r - The runnable containing the stuff that needs to be executed.public void terminate()
|
The Meta-Environment API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||