|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.dependencymanager.SerialExecutor
public final class SerialExecutor
Allows you to enqueue tasks from multiple threads and then execute them on one thread sequentially. It assumes more than one thread will try to execute the tasks and it will make an effort to pick the first task that comes along whilst making sure subsequent tasks return without waiting.
Constructor Summary | |
---|---|
SerialExecutor()
|
Method Summary | |
---|---|
void |
enqueue(java.lang.Runnable runnable)
Enqueue a new task for later execution. |
void |
execute()
Execute any pending tasks. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SerialExecutor()
Method Detail |
---|
public void enqueue(java.lang.Runnable runnable)
runnable
- the runnable containing the actual taskpublic void execute()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |