|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.threads.BalancingExecutor
public class BalancingExecutor
A simple load-balancing executor. If no delegate executors are defined, then tasks are rejected. Executors are chosen in a round-robin fashion.
| Constructor Summary | |
|---|---|
BalancingExecutor()
Construct a new instance. |
|
BalancingExecutor(java.util.concurrent.Executor... executors)
Construct a new instance. |
|
| Method Summary | |
|---|---|
void |
addExecutor(java.util.concurrent.Executor executor)
Add a delegate executor. |
void |
clear()
Clear out all delegate executors at once. |
void |
execute(java.lang.Runnable command)
Execute a task. |
void |
removeExecutor(java.util.concurrent.Executor executor)
Remove a delegate executor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BalancingExecutor()
public BalancingExecutor(java.util.concurrent.Executor... executors)
executors - the initial list of executors to delegate to| Method Detail |
|---|
public void execute(java.lang.Runnable command)
throws java.util.concurrent.RejectedExecutionException
execute in interface java.util.concurrent.Executorcommand - the task to execute
java.util.concurrent.RejectedExecutionException - if no executors are available to run the taskpublic void clear()
public void addExecutor(java.util.concurrent.Executor executor)
executor - the executor to addpublic void removeExecutor(java.util.concurrent.Executor executor)
executor - the executor to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||