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 |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2022-07-06 (世界標準時間)。
[]
[]