|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ThreadPool
A thread pool.
Method Summary | |
---|---|
void |
run(Runnable runnable)
Run a runnable |
void |
run(Runnable runnable,
long startTimeout,
long completeTimeout)
|
void |
runTask(Task task)
Run a task |
void |
runTaskWrapper(TaskWrapper wrapper)
Run a task wrapper |
void |
stop(boolean immediate)
Stop the pool |
void |
waitForTasks()
Wait on the queued tasks to complete. |
void |
waitForTasks(long maxWaitTime)
Wait on the queued tasks to complete upto maxWaitTime milliseconds. |
Method Detail |
---|
void stop(boolean immediate)
immediate
- whether to shutdown immediatelyvoid waitForTasks() throws InterruptedException
InterruptedException
void waitForTasks(long maxWaitTime) throws InterruptedException
maxWaitTime
-
InterruptedException
void runTaskWrapper(TaskWrapper wrapper)
wrapper
- the task wrappervoid runTask(Task task)
task
- the task
IllegalArgumentException
- for a null taskvoid run(Runnable runnable)
runnable
- the runnable
IllegalArgumentException
- for a null runnablevoid run(Runnable runnable, long startTimeout, long completeTimeout)
runnable
- startTimeout
- completeTimeout
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |