public final class ThreadPoolUtils extends Object
| 构造器和说明 |
|---|
ThreadPoolUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> List<FutureTask<T>> |
execute(ExecutorService executor,
Callable<T> callable,
int loopSize) |
static ExecutorService |
newThreadPool(int minPoolSize,
int maxPoolSize,
int keepAliveTime,
BlockingQueue<Runnable> workQueue) |
<T> CompletionService<T> |
submit4Complete(ExecutorService executor,
Callable<T> callable,
int loopSize) |
<T> CompletionService<T> |
submit4Complete(ExecutorService executor,
Runnable runnable,
int loopSize,
T result) |
<T> List<Future<T>> |
submit4Future(ExecutorService executor,
Callable<T> callable,
int loopSize) |
<T> List<T> |
submitResult(ExecutorService executor,
Callable<T> callable,
int loopSize) |
public <T> List<FutureTask<T>> execute(ExecutorService executor, Callable<T> callable, int loopSize)
public <T> List<T> submitResult(ExecutorService executor, Callable<T> callable, int loopSize)
public <T> List<Future<T>> submit4Future(ExecutorService executor, Callable<T> callable, int loopSize)
public <T> CompletionService<T> submit4Complete(ExecutorService executor, Callable<T> callable, int loopSize)
public <T> CompletionService<T> submit4Complete(ExecutorService executor, Runnable runnable, int loopSize, T result)
public static ExecutorService newThreadPool(int minPoolSize, int maxPoolSize, int keepAliveTime, BlockingQueue<Runnable> workQueue)
Copyright © 2016. All rights reserved.