集群命令
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 |