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)
进行同步,以ERROR(/ExecutorService)
命令。
概要
嵌套类 | |
---|---|
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 is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-09-08 UTC.