|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ThreadPool
An interface representing a resizable thread pool which allows asynchronous dispatching of Runnable tasks. It is the responsibility of the Runnable task to handle exceptions gracefully. Any non handled exception will typically just be logged. Though a ThreadPool implementation could have some custom Exception handler
Method Summary | |
---|---|
void |
invokeLater(java.lang.Runnable task)
Dispatch a new task onto this pool to be invoked asynchronously later. |
void |
resize(int newSize)
Resize the thread pool. |
void |
stop()
Stops the pool. |
Method Detail |
---|
void invokeLater(java.lang.Runnable task)
task
- the task to invokevoid stop()
void resize(int newSize) throws ThreadPoolException
newSize
- new number of threads in the thread pool
ThreadPoolException
- if any error occurs during starting threads
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |