集群命令
public class ClusterCommand
extends Object
java.lang.Object | |
↳ | com.android.tradefed.cluster.ClusterCommand |
表示从 TF 集群中获取的任务的类。
概括
公共构造函数 | |
---|---|
ClusterCommand (String commandId, String taskId, String cmdLine) | |
ClusterCommand (String requestId, String commandId, String taskId, String cmdLine, String attemptId, ClusterCommand.RequestType requestType, Integer shardCount, Integer shardIndex) 构造函数。 |
公共方法 | |
---|---|
static ClusterCommand | fromJson (JSONObject json) |
String | getAttemptId () 返回尝试 ID。 |
String | getCommandId () 返回命令 ID。 |
String | getCommandLine () 返回命令行字符串。 |
UniqueMultiMap <String, String> | getExtraOptions () |
String | getRequestId () 返回请求 ID。 |
ClusterCommand.RequestType | getRequestType () 返回请求类型 |
Integer | getShardCount () 返回分片计数。 |
Integer | getShardIndex () 返回分片索引。 |
getTargetDeviceSerials () 返回此命令将尝试运行的目标设备序列号列表。 | |
String | getTaskId () 返回任务 ID。 |
void | setTargetDeviceSerials ( targetDeviceSerials) setTargetDeviceSerials ( targetDeviceSerials) 设置命令将尝试运行的目标设备序列号列表。 |
公共构造函数
集群命令
public ClusterCommand (String commandId, String taskId, String cmdLine)
参数 | |
---|---|
commandId | String |
taskId | String |
cmdLine | String |
集群命令
public ClusterCommand (String requestId, String commandId, String taskId, String cmdLine, String attemptId, ClusterCommand.RequestType requestType, Integer shardCount, Integer shardIndex)
构造函数。
参数 | |
---|---|
requestId | String : 一个请求ID |
commandId | String : 发出此任务的命令的 ID |
taskId | String : 这个任务的ID |
cmdLine | String :要运行的命令行 |
attemptId | String |
requestType | ClusterCommand.RequestType :请求类型 |
shardCount | Integer :分片数 |
shardIndex | Integer : 分片索引 |
公共方法
来自Json
public static ClusterCommand fromJson (JSONObject json)
参数 | |
---|---|
json | JSONObject |
退货 | |
---|---|
ClusterCommand |
投掷 | |
---|---|
JSONException |
获取AttemptId
public String getAttemptId ()
返回尝试 ID。该尝试是随机生成的 GUID,用于区分多个命令运行。
退货 | |
---|---|
String | 尝试 ID |
getCommandId
public String getCommandId ()
返回命令 ID。
退货 | |
---|---|
String | 命令 ID |
获取命令行
public String getCommandLine ()
返回命令行字符串。
退货 | |
---|---|
String | 命令行字符串。 |
获取额外选项
public UniqueMultiMap<String, String> getExtraOptions ()
退货 | |
---|---|
UniqueMultiMap <String, String> | 要注入的附加选项的多重映射 |
getRequestId
public String getRequestId ()
返回请求 ID。
退货 | |
---|---|
String | 请求 ID |
getShardCount
public Integer getShardCount ()
返回分片计数。
退货 | |
---|---|
Integer | 分片计数。 |
获取ShardIndex
public Integer getShardIndex ()
返回分片索引。
退货 | |
---|---|
Integer | 分片索引。 |
getTargetDeviceSerials
publicgetTargetDeviceSerials ()
返回此命令将尝试运行的目标设备序列号列表。
退货 | |
---|---|
目标设备序列号列表 |
获取任务ID
public String getTaskId ()
返回任务 ID。
退货 | |
---|---|
String | 任务编号。 |
setTargetDeviceSerials
public void setTargetDeviceSerials (targetDeviceSerials)
设置命令将尝试运行的目标设备序列号列表。
参数 | |
---|---|
targetDeviceSerials |