ClusterCommand
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(
設定指令將嘗試執行的目標裝置序號清單。 |
公用建構函式
ClusterCommand
public ClusterCommand (String commandId, String taskId, String cmdLine)
參數 | |
---|---|
commandId |
String |
taskId |
String |
cmdLine |
String |
ClusterCommand
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 :區塊索引 |
公用方法
fromJson
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 |
:要設定的裝置序號清單 |