IClusterClient

public interface IClusterClient

com.android.tradefed.cluster.IClusterClient


Một giao diện để tương tác với phần phụ trợ TFC.

Tóm tắt

Hằng số

String TYPE_NAME

Tên kiểu đối tượng cấu hình duy nhất.

Phương thức công khai

abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader()

Nhận IClusterEventUploader có thể dùng để tải ClusterCommandEvent lên.

abstract ClusterCommand.State getCommandState(String requestId, String commandId)

Xác định trạng thái của lệnh cụm.

default ClusterCommandStatus getCommandStatus(String requestId, String commandId)

Nhận trạng thái lệnh của một lệnh cụm (trạng thái và lý do huỷ nếu bị huỷ).

abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader()

Nhận IClusterEventUploader có thể dùng để tải ClusterHostEvent lên.

abstract TestContext getTestContext(String requestId, String commandId)
abstract TestEnvironment getTestEnvironment(String requestId)

Nhận TestEnvironment cho một yêu cầu.

abstract List<TestResource> getTestResources(String requestId)

Nhận TestResource cho một yêu cầu.

abstract List<ClusterCommand> leaseHostCommands(String clusterId, String hostname, List<ClusterDeviceInfo> devices, List<String> nextClusterIds, int maxTasksTolease)

Cho thuê ClusterCommand cho máy chủ lưu trữ đã cho.

abstract void updateTestContext(String requestId, String commandId, TestContext testContext)

Hằng số

TYPE_NAME

public static final String TYPE_NAME

Tên kiểu đối tượng cấu hình duy nhất. Dùng để truy xuất thực thể singleton từ GlobalConfiguration.

Giá trị không đổi: "cluster_client"

Phương thức công khai

getCommandEventUploader

public abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

Nhận IClusterEventUploader có thể dùng để tải ClusterCommandEvent lên.

Giá trị trả về
IClusterEventUploader<ClusterCommandEvent>

getCommandState

public abstract ClusterCommand.State getCommandState (String requestId, 
                String commandId)

Xác định trạng thái của lệnh cụm.

Tham số
requestId String: mã yêu cầu cụm

commandId String: mã lệnh cụm

Giá trị trả về
ClusterCommand.State trạng thái của lệnh cụm hoặc ClusterCommand.State.UNKNOWN nếu không xác định được trạng thái

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

Nhận trạng thái lệnh của một lệnh cụm (trạng thái và lý do huỷ nếu bị huỷ).

Tham số
requestId String: mã yêu cầu cụm

commandId String: mã lệnh cụm

Giá trị trả về
ClusterCommandStatus ClusterCommandStatus đại diện cho trạng thái và lý do huỷ nếu lệnh bị huỷ. Trạng thái là ClusterCommand.State.UNKNOWN nếu không xác định được.

getHostEventUploader

public abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

Nhận IClusterEventUploader có thể dùng để tải ClusterHostEvent lên.

Giá trị trả về
IClusterEventUploader<ClusterHostEvent>

getTestContext

public abstract TestContext getTestContext (String requestId, 
                String commandId)

Tham số
requestId String

commandId String

Giá trị trả về
TestContext

Gửi
IOException
JSONException

getTestEnvironment

public abstract TestEnvironment getTestEnvironment (String requestId)

Nhận TestEnvironment cho một yêu cầu.

Giá trị trả về
TestEnvironment một đối tượng TestEnvironment.

Gửi
java.io.IOException
org.json.JSONException
IOException
JSONException

getTestResources

public abstract List<TestResource> getTestResources (String requestId)

Nhận TestResource cho một yêu cầu.

Giá trị trả về
List<TestResource> danh sách TestResource.

Gửi
java.io.IOException
org.json.JSONException
IOException
JSONException

leaseHostCommands

public abstract List<ClusterCommand> leaseHostCommands (String clusterId, 
                String hostname, 
                List<ClusterDeviceInfo> devices, 
                List<String> nextClusterIds, 
                int maxTasksTolease)

Cho thuê ClusterCommand cho máy chủ lưu trữ đã cho.

Tham số
clusterId String: mã nhận dạng cụm cho máy chủ

hostname String: tên máy chủ

devices List: deviceInfos mà máy chủ lưu trữ có

nextClusterIds List: danh sách mã nhận dạng cụm tiếp theo để cho thuê các lệnh.

maxTasksTolease int: số lượng tối đa các tác vụ hiện có thể được thuê

Giá trị trả về
List<ClusterCommand> danh sách ClusterCommand

Gửi
org.json.JSONException
JSONException

updateTestContext

public abstract void updateTestContext (String requestId, 
                String commandId, 
                TestContext testContext)

Tham số
requestId String

commandId String

testContext TestContext

Gửi
IOException
JSONException