叢集客戶端
public class ClusterClient
extends Object
implements IClusterClient
java.lang.Object |
↳ | com.android.tradefed.cluster.ClusterClient |
用於與 TFC 後端互動的IClusterClient
實作。
概括
公共方法 |
---|
IClusterEventUploader < ClusterCommandEvent > | getCommandEventUploader () 取得可用於上傳ClusterCommandEvent IClusterEventUploader 。 |
ClusterCommand.State | getCommandState (String requestId, String commandId) 確定集群命令的狀態。 |
ClusterCommandStatus | getCommandStatus (String requestId, String commandId) 取得叢集命令的命令狀態(狀態和取消原因(如果取消))。 |
IClusterEventUploader < ClusterHostEvent > | getHostEventUploader () 取得可用於上傳ClusterHostEvent IClusterEventUploader 。 |
TestContext | getTestContext (String requestId, String commandId) |
TestEnvironment | getTestEnvironment (String requestId) 取得請求的TestEnvironment 。 |
| getTestResources (String requestId) 取得請求的TestResource 。 |
| leaseHostCommands (String clusterId, String hostname, deviceInfos, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, deviceInfos, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, deviceInfos, nextClusterIds, int maxTasksTolease) 為給定主機租用ClusterCommand 。 |
void | updateTestContext (String requestId, String commandId, TestContext testContext) |
公共構造函數
叢集客戶端
public ClusterClient ()
公共方法
取得命令狀態
public 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 TestContext getTestContext (String requestId,
String commandId)
參數 |
---|
requestId | String |
commandId | String |
取得測試資源
public getTestResources (String requestId)
取得請求的TestResource
。
租賃主機指令
public leaseHostCommands (String clusterId,
String hostname,
deviceInfos,
nextClusterIds,
int maxTasksTolease)
為給定主機租用ClusterCommand
。
參數 |
---|
clusterId | String : 主機的叢集 ID |
hostname | String :主機名 |
deviceInfos | :主機擁有的deviceInfos |
nextClusterIds | :從中租用指令的下一個叢集 ID 的清單。 |
maxTasksTolease | int : 目前可以租用的最大任務數 |
更新測試情境
public void updateTestContext (String requestId,
String commandId,
TestContext testContext)
參數 |
---|
requestId | String |
commandId | String |
testContext | TestContext |