| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.ThreadPool
public class ThreadPool
A simple thread pool. Idle threads are cached for future use. The cache grows until it reaches a maximum size (default 10). When there is nothing in the cache, a new thread is created. By default the threads are daemon threads. Rickard …berg Adrian Brock
| Constructor Summary | |
|---|---|
| ThreadPool()Create a new pool. | |
| ThreadPool(boolean active)Create a new pool with an activity status | |
| Method Summary | |
|---|---|
|  boolean | getDaemonThreads()Get whether new threads are daemon threads. | 
|  int | getMaximumSize()Get the maximum number of idle threads cached in this pool. | 
|  boolean | isActive()Get the activity status of the pool. | 
|  void | run(Runnable work)Do some work. | 
|  void | setActive(boolean status)Set the activity status of the pool. | 
|  void | setDaemonThreads(boolean value)Set whether new threads are daemon threads. | 
|  void | setMaximumSize(int size)Set the maximum number of idle threads cached in this pool. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ThreadPool()
public ThreadPool(boolean active)
active - true for active, false otherwise| Method Detail | 
|---|
public void setMaximumSize(int size)
size - the new maximum size.public int getMaximumSize()
public void setActive(boolean status)
status - pass true for active, false otherwise.public boolean isActive()
public void setDaemonThreads(boolean value)
value - pass true for daemon threads, false otherwise.public boolean getDaemonThreads()
public void run(Runnable work)
work - the work to perform.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||