集群命令
public class ClusterCommand
extends Object
java.lang.Object | |
↳ | com.android.tradefed.cluster.ClusterCommand |
表示從 TF Cluster 取得的任務的類別。
概括
嵌套類 | |
---|---|
enum | ClusterCommand.RequestType |
enum | ClusterCommand.State 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 |
取得嘗試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 |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-12-01 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]