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.