|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.papoose.event.util.SerialExecutor
public class SerialExecutor
A handy wrapper class that conveniently queues runnables for execution.
Use this class when you need to have multiple queues feeding a single thread pool.
| Constructor Summary | |
|---|---|
SerialExecutor(java.util.concurrent.Executor executor)
Initialized the serial executor with a shared executor delegate. |
|
| Method Summary | |
|---|---|
void |
execute(java.lang.Runnable runnable)
Executes the given command at some time in the future. |
protected void |
scheduleNext()
Poll the queue for more work. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SerialExecutor(java.util.concurrent.Executor executor)
executor - the shared executor that is fed by this queue| Method Detail |
|---|
public void execute(java.lang.Runnable runnable)
execute in interface java.util.concurrent.Executorrunnable - the runnable task
java.util.concurrent.RejectedExecutionException - if this task cannot be accepted for execution.
java.lang.NullPointerException - if command is nullprotected void scheduleNext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||