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 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 |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-03-30 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]