集群客户端
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 () 获得IClusterEventUploader 可用于上传ClusterHostEvent 秒。 |
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 ()
公开方法
getCommandState
public ClusterCommand.State getCommandState (String requestId,
String commandId)
确定集群命令的状态。
参量 |
---|
requestId | String :集群请求ID |
commandId | String :集群命令ID |
getCommandStatus
public ClusterCommandStatus getCommandStatus (String requestId,
String commandId)
获取集群命令的命令状态(状态和取消原因(如果已取消))。
参量 |
---|
requestId | String :集群请求ID |
commandId | String :集群命令ID |
getTestContext
public TestContext getTestContext (String requestId,
String commandId)
参量 |
---|
requestId | String |
commandId | String |
getTestResources
public getTestResources (String requestId)
获取TestResource
的请求。
leaseHostCommands
public leaseHostCommands (String clusterId,
String hostname,
deviceInfos,
nextClusterIds,
int maxTasksTolease)
为给定主机租用ClusterCommand
。
参量 |
---|
clusterId | String :主机的群集ID |
hostname | String :主机名 |
deviceInfos | :主机拥有的deviceInfos |
nextClusterIds | :下一个要从中租赁命令的集群ID的列表。 |
maxTasksTolease | int :当前可以租用的最大任务数 |
updateTestContext
public void updateTestContext (String requestId,
String commandId,
TestContext testContext)
参量 |
---|
requestId | String |
commandId | String |
testContext | TestContext |