|
JBoss Common Classes 2.2.17.GA | |||||||||
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)
Run runnable with start and complete time out set explicitely. |
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
- for any iterruption errorvoid waitForTasks(long maxWaitTime) throws InterruptedException
maxWaitTime
- the max wait time
InterruptedException
- for any interruption errorvoid 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
- the runnablestartTimeout
- the start timeoutcompleteTimeout
- the complete timeout
IllegalArgumentException
- for a null runnable
|
JBoss Common Classes 2.2.17.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |