IClusterClient
public
interface
IClusterClient
com.android.tradefed.cluster.IClusterClient |
TFC バックエンドとやり取りするためのインターフェース。
概要
定数 | |
---|---|
String |
TYPE_NAME
一意の構成オブジェクト タイプ名。 |
パブリック メソッド | |
---|---|
abstract
IClusterEventUploader<ClusterCommandEvent>
|
getCommandEventUploader()
|
abstract
ClusterCommand.State
|
getCommandState(String requestId, String commandId)
クラスタ コマンドの状態を確認します。 |
default
ClusterCommandStatus
|
getCommandStatus(String requestId, String commandId)
クラスタ コマンドのコマンド ステータス(ステータスと、キャンセルされた場合はキャンセル理由)を取得します。 |
abstract
IClusterEventUploader<ClusterHostEvent>
|
getHostEventUploader()
|
abstract
TestContext
|
getTestContext(String requestId, String commandId)
|
abstract
TestEnvironment
|
getTestEnvironment(String requestId)
リクエストの |
abstract
|
getTestResources(String requestId)
リクエストの |
abstract
|
leaseHostCommands(String clusterId, String hostname,
指定されたホストの |
abstract
void
|
updateTestContext(String requestId, String commandId, TestContext testContext)
|
定数
TYPE_NAME
public static final String TYPE_NAME
一意の構成オブジェクト タイプ名。GlobalConfiguration
からシングルトン インスタンスを取得するために使用されます。
定数値: "cluster_client"
パブリック メソッド
getCommandEventUploader
public abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()
ClusterCommandEvent
のアップロードに使用できる IClusterEventUploader
を取得します。
戻り値 | |
---|---|
IClusterEventUploader<ClusterCommandEvent> |
getCommandState
public abstract ClusterCommand.State getCommandState (String requestId, String commandId)
クラスタ コマンドの状態を確認する。
パラメータ | |
---|---|
requestId |
String : クラスタ リクエスト ID |
commandId |
String : クラスタ コマンド ID |
戻り値 | |
---|---|
ClusterCommand.State |
クラスタ コマンドのステータス(ステータスを特定できない場合は ClusterCommand.State.UNKNOWN ) |
getCommandStatus
public ClusterCommandStatus getCommandStatus (String requestId, String commandId)
クラスタ コマンドのコマンド ステータス(ステータスと、キャンセルされた場合はキャンセル理由)を取得します。
パラメータ | |
---|---|
requestId |
String : クラスタ リクエスト ID |
commandId |
String : クラスタ コマンド ID |
戻り値 | |
---|---|
ClusterCommandStatus |
状態と、コマンドがキャンセルされた場合のキャンセル理由を表す ClusterCommandStatus。状態を特定できない場合は ClusterCommand.State.UNKNOWN です。 |
getHostEventUploader
public abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()
ClusterHostEvent
のアップロードに使用できる IClusterEventUploader
を取得します。
戻り値 | |
---|---|
IClusterEventUploader<ClusterHostEvent> |
getTestContext
public abstract TestContext getTestContext (String requestId, String commandId)
パラメータ | |
---|---|
requestId |
String |
commandId |
String |
戻り値 | |
---|---|
TestContext |
例外 | |
---|---|
JSONException |
getTestEnvironment
public abstract TestEnvironment getTestEnvironment (String requestId)
リクエストの TestEnvironment
を取得します。
戻り値 | |
---|---|
TestEnvironment |
TestEnvironment オブジェクト。 |
例外 | |
---|---|
|
IOException |
|
org.json.JSONException |
JSONException |
getTestResources
public abstractgetTestResources (String requestId)
リクエストの TestResource
を取得します。
戻り値 | |
---|---|
|
TestResource のリスト。 |
例外 | |
---|---|
|
IOException |
|
org.json.JSONException |
JSONException |
leaseHostCommands
public abstractleaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease)
指定されたホストに ClusterCommand
をリースします。
パラメータ | |
---|---|
clusterId |
String : ホストのクラスタ ID |
hostname |
String : ホスト名 |
devices |
: ホストが持つ deviceInfos |
nextClusterIds |
: コマンドをリースする次のクラスタ ID のリスト。 |
maxTasksTolease |
int : 現在リースできるタスクの最大数 |
戻り値 | |
---|---|
|
ClusterCommand のリスト |
例外 | |
---|---|
|
org.json.JSONException |
JSONException |
updateTestContext
public abstract void updateTestContext (String requestId, String commandId, TestContext testContext)
パラメータ | |
---|---|
requestId |
String |
commandId |
String |
testContext |
TestContext |
例外 | |
---|---|
JSONException |