public class ThreadPoolHolder extends Object
Constructor and Description |
---|
ThreadPoolHolder(int[] poolSizes,
org.objectweb.proactive.utils.NamedThreadFactory[] threadFactories)
Instantiates the thread pools.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(int num,
Runnable task)
Executes a task in the specified thread pool
|
void |
shutdown(int num,
int totalMaxWaitTime) |
void |
shutdownNow(int num) |
<T> Future<T> |
submit(int num,
Callable<T> task)
Submits a task to the specified thread pool
|
public ThreadPoolHolder(int[] poolSizes, org.objectweb.proactive.utils.NamedThreadFactory[] threadFactories)
public <T> Future<T> submit(int num, Callable<T> task)
num
- thread pool indextask
- to be submittedpublic void execute(int num, Runnable task)
num
- thread pool indextask
- to be executedpublic void shutdown(int num, int totalMaxWaitTime)
public void shutdownNow(int num)