|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectledge.threads.ThreadPool
public class ThreadPool
Thread pool component.
| Field Summary | |
|---|---|
private Valve |
cleanup
cleanup valve (possibly pipeline). |
private Context |
context
thread's processing context. |
private int |
daemonPriority
|
private org.jcontainer.dna.Logger |
log
|
private static String |
THREAD_GROUP_NAME
|
private ThreadGroup |
threadGroup
thread pool's thread group. |
private Set<Daemon> |
threads
|
private WorkerPool |
workerPool
|
private int |
workerPoolCapacity
|
private int |
workerPriority
|
| Constructor Summary | |
|---|---|
ThreadPool(Valve cleanup,
Context context,
org.jcontainer.dna.Configuration config,
org.jcontainer.dna.Logger log)
Component constructor. |
|
| Method Summary | |
|---|---|
void |
runDaemon(Task task)
Run the daemon task. |
void |
runWorker(Task task)
Run the worker task. |
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String THREAD_GROUP_NAME
private Context context
private Valve cleanup
private ThreadGroup threadGroup
private int daemonPriority
private int workerPriority
private int workerPoolCapacity
private Set<Daemon> threads
private org.jcontainer.dna.Logger log
private WorkerPool workerPool
| Constructor Detail |
|---|
public ThreadPool(Valve cleanup,
Context context,
org.jcontainer.dna.Configuration config,
org.jcontainer.dna.Logger log)
cleanup - the valve that should be invoked every time the thread finishes it's work.context - thread processing context.config - the pool configuration.log - the logger to use.| Method Detail |
|---|
public void runWorker(Task task)
task - the task to run.public void runDaemon(Task task)
task - the task to run.public void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||