ClusterCommand

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)

设置命令将尝试在其上运行的目标设备序列号列表。

公共构造函数

ClusterCommand

public ClusterCommand (String commandId, 
                String taskId, 
                String cmdLine)

参数
commandId String

taskId String

cmdLine String

ClusterCommand

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:分片索引

公共方法

fromJson

public static ClusterCommand fromJson (JSONObject json)

参数
json JSONObject

返回
ClusterCommand

抛出
JSONException

getAttemptId

public String getAttemptId ()

返回尝试 ID。尝试是随机生成的 GUID,用于区分多次运行的命令。

返回
String 尝试 ID

getCommandId

public String getCommandId ()

返回命令 ID。

返回
String 命令 ID

getCommandLine

public String getCommandLine ()

返回命令行字符串。

返回
String 命令行字符串。

getExtraOptions

public UniqueMultiMap<String, String> getExtraOptions ()

返回
UniqueMultiMap<String, String> 要注入的其他选项的多映射

getRequestId

public String getRequestId ()

返回请求 ID。

返回
String 请求 ID

getRequestType

public ClusterCommand.RequestType getRequestType ()

返回请求类型

返回
ClusterCommand.RequestType 请求类型

getShardCount

public Integer getShardCount ()

返回分片计数。

返回
Integer 分片数。

getShardIndex

public Integer getShardIndex ()

返回分片编号。

返回
Integer 分片索引。

getTargetDeviceSerials

public  getTargetDeviceSerials ()

返回此命令将尝试在其上运行的目标设备序列号列表。

返回
目标设备序列号列表

getTaskId

public String getTaskId ()

返回任务 ID。

返回
String 任务 ID。

setTargetDeviceSerials

public void setTargetDeviceSerials ( targetDeviceSerials)

设置命令将尝试在其上运行的目标设备序列号列表。

参数
targetDeviceSerials :要设置的设备序列号列表