|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.threads.OrderedExecutor
public final class OrderedExecutor
An executor that always runs all tasks in queue order, using a delegate executor to run the tasks.
More specifically, if a FIFO queue type is used, any call B to theexecute(Runnable)
method that
happens-after another call A to the same method, will result in B's task running after A's.
Constructor Summary | |
---|---|
OrderedExecutor(java.util.concurrent.Executor parent)
Construct a new instance using an unbounded FIFO queue. |
|
OrderedExecutor(java.util.concurrent.Executor parent,
java.util.Queue<java.lang.Runnable> queue)
Construct a new instance using the given queue and a blocking reject policy. |
|
OrderedExecutor(java.util.concurrent.Executor parent,
java.util.Queue<java.lang.Runnable> queue,
RejectionPolicy policy,
java.util.concurrent.Executor handoffExecutor)
Construct a new instance. |
|
OrderedExecutor(java.util.concurrent.Executor parent,
RejectionPolicy policy,
java.util.concurrent.Executor handoffExecutor)
Construct a new instance using an unbounded FIFO queue. |
Method Summary | |
---|---|
void |
execute(java.lang.Runnable command)
Run a task. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OrderedExecutor(java.util.concurrent.Executor parent)
parent
- the parent to delegate tasks topublic OrderedExecutor(java.util.concurrent.Executor parent, java.util.Queue<java.lang.Runnable> queue)
parent
- the parent to delegate tasks toqueue
- the queue to use to hold taskspublic OrderedExecutor(java.util.concurrent.Executor parent, RejectionPolicy policy, java.util.concurrent.Executor handoffExecutor)
parent
- the parent executorpolicy
- the task rejection policyhandoffExecutor
- the executor to hand tasks to if the queue is fullpublic OrderedExecutor(java.util.concurrent.Executor parent, java.util.Queue<java.lang.Runnable> queue, RejectionPolicy policy, java.util.concurrent.Executor handoffExecutor)
parent
- the parent executorqueue
- the task queue to usepolicy
- the task rejection policyhandoffExecutor
- the executor to hand tasks to if the queue is fullMethod Detail |
---|
public void execute(java.lang.Runnable command)
execute
in interface java.util.concurrent.Executor
command
- the task to run.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |