DeviceConcurrentUtil
public
class
DeviceConcurrentUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.DeviceConcurrentUtil |
Contains utility methods and classes for concurrent device side command execution
Use ERROR(/ExecutorService)
to run commands implemented as ShellCommandCallable
, and use
ERROR(/#joinFuture(String,Future,long))
for synchronization against the ERROR(/Future)
as
returned by ERROR(/ExecutorService)
for the command execution.
Summary
Nested classes | |
---|---|
class |
DeviceConcurrentUtil.ShellCommandCallable<V>
A |
Public methods | |
---|---|
static
<T>
T
|
joinFuture(String taskDesc,
Convenience method to join current thread on the
|
Public methods
joinFuture
public static T joinFuture (String taskDesc,task, long timeout)
Convenience method to join current thread on the task
DeviceNotAvailableException
and ERROR(/TimeoutException)
occurred during execution
are passed through transparently, others are logged as error but not otherwise handled.
Parameters | |
---|---|
taskDesc |
String : description of task for logging purpose |
task |
: ERROR(/Future) representing the task to join |
timeout |
long : timeout for waiting on the task |
Returns | |
---|---|
T |
The result of the task with the template type. |
Throws | |
---|---|
|
com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-08-03 UTC.