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,
実行中に発生した |
パブリック メソッド
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 |
|