ParallelDeviceExecutor

public class ParallelDeviceExecutor
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.executor.ParallelDeviceExecutor<V>


Wrapper of ExecutorService to execute a function in parallel.

Summary

Public constructors

ParallelDeviceExecutor(int poolSize)

Public methods

List<Throwable> getErrors()

The list of errors from the execution of all tasks.

boolean hasErrors()

Whether or not some errors occurred or not.

List<V> invokeAll(List<Callable<V>> callableTasks, long timeout, TimeUnit unit)

Invoke all the Callable with the timeout limit.

Public constructors

ParallelDeviceExecutor

public ParallelDeviceExecutor (int poolSize)

Parameters
poolSize int

Public methods

getErrors

public List<Throwable> getErrors ()

The list of errors from the execution of all tasks.

Returns
List<Throwable>

hasErrors

public boolean hasErrors ()

Whether or not some errors occurred or not.

Returns
boolean

invokeAll

public List<V> invokeAll (List<Callable<V>> callableTasks, 
                long timeout, 
                TimeUnit unit)

Invoke all the Callable with the timeout limit.

Parameters
callableTasks List: The List of tasks.

timeout long: The timeout to apply, or zero for unlimited.

unit TimeUnit: The unit of the timeout.

Returns
List<V> The list of results for each callable task.