|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectrabbit.util.ThreadPool
This is a thread pool. It uses RestartableThread.
| Constructor Summary | |
ThreadPool(RestartableThreadFactory tf,
int limit)
Create a ThreadPool. |
|
| Method Summary | |
RestartableThreadFactory |
getFactory()
Get the current factory. |
int |
getLimit()
Get the current limit of concurrent threads. |
RestartableThread |
getThread()
Get a Thread. |
void |
returnThread(RestartableThread t)
Return a thread to the pool. |
void |
setFactory(RestartableThreadFactory tf)
Set the factory to use for creating threads. |
void |
setLimit(int limit)
Set the limit. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ThreadPool(RestartableThreadFactory tf,
int limit)
tf - the RestartableThreadFactory that is used as more Threads are needed.limit - dont create more threads than this.| Method Detail |
public void setLimit(int limit)
limit - the new limit of concurrent threads.public int getLimit()
public RestartableThread getThread()
public void returnThread(RestartableThread t)
t - the thread to return.public void setFactory(RestartableThreadFactory tf)
tf - the new factory.public RestartableThreadFactory getFactory()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||