叢集客戶端
public interface IClusterClient
com.android.tradefed.cluster.IClusterClient |
用於與 TFC 後端互動的介面。
概括
公共方法 |
---|
abstract IClusterEventUploader < ClusterCommandEvent > | getCommandEventUploader () 取得可用於上傳ClusterCommandEvent IClusterEventUploader 。 |
abstract ClusterCommand.State | getCommandState (String requestId, String commandId) 確定集群命令的狀態。 |
default ClusterCommandStatus | getCommandStatus (String requestId, String commandId) 取得叢集命令的命令狀態(狀態和取消原因(如果取消))。 |
abstract IClusterEventUploader < ClusterHostEvent > | getHostEventUploader () 取得可用於上傳ClusterHostEvent IClusterEventUploader 。 |
abstract TestContext | getTestContext (String requestId, String commandId) |
abstract TestEnvironment | getTestEnvironment (String requestId) 取得請求的TestEnvironment 。 |
abstract | getTestResources (String requestId) 取得請求的TestResource 。 |
abstract | leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) 為給定主機租用ClusterCommand 。 |
abstract void | updateTestContext (String requestId, String commandId, TestContext testContext) |
常數
類型_名稱
public static final String TYPE_NAME
唯一的配置物件類型名稱。用於從GlobalConfiguration
檢索單例實例。
常數值:“cluster_client”
公共方法
取得命令狀態
public abstract ClusterCommand.State getCommandState (String requestId,
String commandId)
確定集群命令的狀態。
參數 |
---|
requestId | String : 叢集請求ID |
commandId | String : 叢集命令ID |
取得命令狀態
public ClusterCommandStatus getCommandStatus (String requestId,
String commandId)
取得叢集命令的命令狀態(狀態和取消原因(如果取消))。
參數 |
---|
requestId | String : 叢集請求ID |
commandId | String : 叢集命令ID |
取得測試上下文
public abstract TestContext getTestContext (String requestId,
String commandId)
參數 |
---|
requestId | String |
commandId | String |
取得測試資源
public abstract getTestResources (String requestId)
取得請求的TestResource
。
投擲 |
---|
| IO異常 |
| org.json.JSONException |
JSONException | |
租賃主機指令
public abstract leaseHostCommands (String clusterId,
String hostname,
devices,
nextClusterIds,
int maxTasksTolease)
為給定主機租用ClusterCommand
。
參數 |
---|
clusterId | String : 主機的叢集 ID |
hostname | String :主機名 |
devices | :主機擁有的deviceInfos |
nextClusterIds | :從中租用指令的下一個叢集 ID 的清單。 |
maxTasksTolease | int : 目前可以租用的最大任務數 |
投擲 |
---|
| org.json.JSONException |
JSONException | |
更新測試情境
public abstract void updateTestContext (String requestId,
String commandId,
TestContext testContext)
參數 |
---|
requestId | String |
commandId | String |
testContext | TestContext |