集群命令
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 Integer getShardCount ()
返回分片計數。
退貨 | |
---|---|
Integer | 分片計數。 |
取得分片索引
public Integer getShardIndex ()
返回分片索引。
退貨 | |
---|---|
Integer | 分片索引。 |
取得目標設備序號
publicgetTargetDeviceSerials ()
傳回此命令將嘗試執行的目標裝置序號的清單。
退貨 | |
---|---|
目標設備序列列表 |
取得任務ID
public String getTaskId ()
返回任務 ID。
退貨 | |
---|---|
String | 任務ID。 |
設定目標設備序號
public void setTargetDeviceSerials (targetDeviceSerials)
設定命令將嘗試執行的目標設備序號的清單。
參數 | |
---|---|
targetDeviceSerials |