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(/ExecutorService)
れるERROR(/Future)
と同期します。
概要
ネストされたクラス | |
---|---|
class | DeviceConcurrentUtil.ShellCommandCallable <V> |
パブリックメソッド | |
---|---|
static <T> T | joinFuture (String taskDesc, task, long timeout) joinFuture (String taskDesc, task, long timeout) 実行中に発生した |
パブリックメソッド
joinFuture
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.