public interface ThreadPool
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 timeInterruptedException - for any interruption errorvoid runTaskWrapper(TaskWrapper wrapper)
wrapper - the task wrappervoid runTask(Task task)
task - the taskIllegalArgumentException - for a null taskvoid run(Runnable runnable)
runnable - the runnableIllegalArgumentException - for a null runnablevoid run(Runnable runnable, long startTimeout, long completeTimeout)
runnable - the runnablestartTimeout - the start timeoutcompleteTimeout - the complete timeoutIllegalArgumentException - for a null runnableCopyright © 2015 JBoss by Red Hat. All rights reserved.