集群命令

public class ClusterCommand
extends Object

java.lang.Object
com.android.tradefed.cluster.ClusterCommand


表示从 TF Cluster 获取的任务的类。

概括

公共构造函数

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

获取尝试ID

public String getAttemptId ()

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

退货
String尝试 ID

获取命令ID

public String getCommandId ()

返回命令 ID。

退货
String命令ID

获取命令行

public String getCommandLine ()

返回命令行字符串。

退货
String命令行字符串。

获取额外选项

public UniqueMultiMap<String, String> getExtraOptions ()

退货
UniqueMultiMap <String, String>要注入的附加选项的多重映射

获取请求ID

public String getRequestId ()

返回请求 ID。

退货
String请求ID

获取请求类型

public ClusterCommand.RequestType getRequestType ()

返回请求类型

退货
ClusterCommand.RequestType请求类型

获取分片数量

public Integer getShardCount ()

返回分片计数。

退货
Integer分片计数。

获取分片索引

public Integer getShardIndex ()

返回分片索引。

退货
Integer分片索引。

获取目标设备序列号

public  getTargetDeviceSerials ()

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

退货
目标设备序列列表

获取任务ID

public String getTaskId ()

返回任务 ID。

退货
String任务ID。

设置目标设备序列号

public void setTargetDeviceSerials ( targetDeviceSerials)

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

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

,

集群命令

public class ClusterCommand
extends Object

java.lang.Object
com.android.tradefed.cluster.ClusterCommand


表示从 TF Cluster 获取的任务的类。

概括

公共构造函数

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

获取尝试ID

public String getAttemptId ()

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

退货
String尝试 ID

获取命令ID

public String getCommandId ()

返回命令 ID。

退货
String命令ID

获取命令行

public String getCommandLine ()

返回命令行字符串。

退货
String命令行字符串。

获取额外选项

public UniqueMultiMap<String, String> getExtraOptions ()

退货
UniqueMultiMap <String, String>要注入的附加选项的多重映射

获取请求ID

public String getRequestId ()

返回请求 ID。

退货
String请求ID

获取请求类型

public ClusterCommand.RequestType getRequestType ()

返回请求类型

退货
ClusterCommand.RequestType请求类型

获取分片数量

public Integer getShardCount ()

返回分片计数。

退货
Integer分片计数。

获取分片索引

public Integer getShardIndex ()

返回分片索引。

退货
Integer分片索引。

获取目标设备序列号

public  getTargetDeviceSerials ()

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

退货
目标设备序列列表

获取任务ID

public String getTaskId ()

返回任务 ID。

退货
String任务ID。

设置目标设备序列号

public void setTargetDeviceSerials ( targetDeviceSerials)

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

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