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()

傳回分片索引。

List<String> getTargetDeviceSerials()

傳回這項指令嘗試執行的目標裝置序號清單。

String getTaskId()

傳回工作 ID。

void setTargetDeviceSerials(List<String> targetDeviceSerials)

設定指令嘗試執行的目標裝置序號清單。

公用建構函式

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

public List<String> getTargetDeviceSerials ()

傳回這項指令嘗試執行的目標裝置序號清單。

傳回
List<String> 目標裝置序號清單

getTaskId

public String getTaskId ()

傳回工作 ID。

傳回
String 工作 ID。

setTargetDeviceSerials

public void setTargetDeviceSerials (List<String> targetDeviceSerials)

設定指令嘗試執行的目標裝置序號清單。

參數
targetDeviceSerials List:要設定的裝置序號清單