ParallelDeviceExecutor
public
class
ParallelDeviceExecutor
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.util.executor.ParallelDeviceExecutor<V> |
ExecutorService 的封装容器,用于并行执行函数。
摘要
公共构造函数 | |
|---|---|
ParallelDeviceExecutor(int poolSize)
|
|
公共方法 | |
|---|---|
List<Throwable>
|
getErrors()
执行所有任务时出现的错误列表。 |
boolean
|
hasErrors()
是否出现了一些错误。 |
List<V>
|
invokeAll(List<Callable<V>> callableTasks, long timeout, TimeUnit unit)
在超时限制内调用所有 |
公共构造函数
ParallelDeviceExecutor
public ParallelDeviceExecutor (int poolSize)
| 参数 | |
|---|---|
poolSize |
int |
公共方法
getErrors
public List<Throwable> getErrors ()
执行所有任务时出现的错误列表。
| 返回 | |
|---|---|
List<Throwable> |
|
hasErrors
public boolean hasErrors ()
是否出现了一些错误。
| 返回 | |
|---|---|
boolean |
|
invokeAll
public List<V> invokeAll (List<Callable<V>> callableTasks,
long timeout,
TimeUnit unit)在超时限制内调用所有 Callable。
| 参数 | |
|---|---|
callableTasks |
List:任务列表。 |
timeout |
long:要应用的超时时间,如果为零,则表示无限制。 |
unit |
TimeUnit:超时时间的单位。 |
| 返回 | |
|---|---|
List<V> |
每个可调用任务的结果列表。 |