|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscone.util.ThreadPool
public class ThreadPool
an unlimited pool of Threads. This pool may be used for Thread-recycling in order to avoid expensive creating and destroying of Threads. In order to execute code in a PoolThread, call the ThreadPool's execute() method.
Constructor Summary | |
---|---|
ThreadPool()
|
Method Summary | |
---|---|
void |
close()
closes the pool and terminates all idle Threads. |
void |
execute(java.lang.Runnable runnable)
executes the specified Runnable in a Thread. |
boolean |
isClosed()
returns true, when the pool has been closed. |
void |
reportIdle(scone.util.PoolThread pt)
reports a Thread to be idle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadPool()
Method Detail |
---|
public void execute(java.lang.Runnable runnable)
runnable
- the code to be executed in a Threadpublic void close()
public boolean isClosed()
public void reportIdle(scone.util.PoolThread pt)
pt
- the PoolThread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |