DeviceConcurrentUtil
public class DeviceConcurrentUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.DeviceConcurrentUtil |
包含用于并发设备端命令执行的实用方法和类
使用ERROR(/ExecutorService)
运行以ShellCommandCallable
实现的命令,并使用ERROR(/#joinFuture(String,Future,long))
与ERROR(/ExecutorService)
返回的ERROR(/Future)
同步以执行命令。
概括
嵌套类 | |
---|---|
class | DeviceConcurrentUtil.ShellCommandCallable <V> 一个 |
公共方法 | |
---|---|
static <T> T | joinFuture (String taskDesc, task, long timeout) joinFuture (String taskDesc, task, long timeout) 在 执行期间发生的 |
公共方法
加入未来
public static T joinFuture (String taskDesc,task, long timeout)
在task
上加入当前线程的便捷方法
执行期间发生的DeviceNotAvailableException
和ERROR(/TimeoutException)
透明传递,其他记录为错误但不进行其他处理。
参数 | |
---|---|
taskDesc | String : 用于记录目的的任务描述 |
task | ERROR(/Future) 代表要加入的任务 |
timeout | long :等待任务的超时时间 |
退货 | |
---|---|
T | 具有模板类型的任务的结果。 |
投掷 | |
---|---|
| 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-07-06 UTC.
[]
[]