集群命令
public class ClusterCommand
extends Object
java.lang.Object | |
↳ | com.android.tradefed.cluster.ClusterCommand |
表示從TF群集獲取的任務的類。
概要
嵌套類 | |
---|---|
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 :分片索引 |
公開方法
來自傑森
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
publicgetTargetDeviceSerials ()
返回此命令將嘗試在其上運行的目標設備序列的列表。
退貨 | |
---|---|
目標設備序列號列表 |
getTaskId
public String getTaskId ()
返回任務ID。
退貨 | |
---|---|
String | 任務ID。 |
setTargetDeviceSerials
public void setTargetDeviceSerials (targetDeviceSerials)
設置命令將嘗試在其上運行的目標設備序列的列表。
參量 | |
---|---|
targetDeviceSerials |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-09-08 UTC.