|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Represents a generic threadpool implementation Exposes a set of thread related parameters to allow the pool to be managed.
| Method Summary | |
void |
execute(java.lang.Runnable unitOfWork)
Execute a Runnable impl using an internal thread |
int |
getMaximumPoolSize()
The max available pool size. |
int |
getMinimumPoolSize()
Minimum available pool size. |
int |
getPoolSize()
Current number of threads in use. |
void |
setMaximumPoolSize(int poolSize)
Set max thread limit, must also support dynamic resizing of the pool. |
void |
setMinimumPoolSize(int poolSize)
Set min thread limit. |
void |
shutdown(int timeout)
Timeout of 0 kills all threads, pending or executing, Greater values will allow the incoming queue to be processed, however blocked threads may cause an issue. |
| Method Detail |
public void execute(java.lang.Runnable unitOfWork)
throws java.lang.InterruptedException
unitOfWork -
java.lang.InterruptedExceptionpublic int getMaximumPoolSize()
public int getMinimumPoolSize()
public int getPoolSize()
public void setMaximumPoolSize(int poolSize)
poolSize - public void setMinimumPoolSize(int poolSize)
poolSize - public void shutdown(int timeout)
timeout -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||