ไอคลัสเตอร์ไคลเอ็นต์
public interface IClusterClient
com.android.tradefed.cluster.IClusterClient |
อินเทอร์เฟซสำหรับการโต้ตอบกับแบ็กเอนด์ TFC
สรุป
ค่าคงที่ |
---|
String | TYPE_NAME ชื่อประเภทออบเจ็กต์การกำหนดค่าเฉพาะ |
วิธีการสาธารณะ |
---|
abstract IClusterEventUploader < ClusterCommandEvent > | getCommandEventUploader () รับ IClusterEventUploader ที่สามารถใช้เพื่ออัปโหลด ClusterCommandEvent |
abstract ClusterCommand.State | getCommandState (String requestId, String commandId) กำหนดสถานะของคำสั่งคลัสเตอร์ |
default ClusterCommandStatus | getCommandStatus (String requestId, String commandId) รับสถานะคำสั่งของคำสั่งคลัสเตอร์ (สถานะและเหตุผลในการยกเลิกหากยกเลิก) |
abstract IClusterEventUploader < ClusterHostEvent > | getHostEventUploader () รับ IClusterEventUploader ที่สามารถใช้เพื่ออัปโหลด ClusterHostEvent |
abstract TestContext | getTestContext (String requestId, String commandId) |
abstract TestEnvironment | getTestEnvironment (String requestId) รับ TestEnvironment สำหรับการร้องขอ |
abstract | getTestResources (String requestId) รับ TestResource สำหรับการร้องขอ |
abstract | leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) Lease ClusterCommand สำหรับโฮสต์ที่ให้ |
abstract void | updateTestContext (String requestId, String commandId, TestContext testContext) |
ค่าคงที่
TYPE_NAME
public static final String TYPE_NAME
ชื่อประเภทออบเจ็กต์การกำหนดค่าเฉพาะ ใช้เพื่อดึงอินสแตนซ์ซิงเกิลตันจาก GlobalConfiguration
ค่าคงที่: "cluster_client"
วิธีการสาธารณะ
รับCommandState
public abstract ClusterCommand.State getCommandState (String requestId,
String commandId)
กำหนดสถานะของคำสั่งคลัสเตอร์
พารามิเตอร์ |
---|
requestId | String : ID คำร้องขอคลัสเตอร์ |
commandId | String : ID คำสั่งคลัสเตอร์ |
รับสถานะคำสั่ง
public ClusterCommandStatus getCommandStatus (String requestId,
String commandId)
รับสถานะคำสั่งของคำสั่งคลัสเตอร์ (สถานะและเหตุผลในการยกเลิกหากยกเลิก)
พารามิเตอร์ |
---|
requestId | String : ID คำร้องขอคลัสเตอร์ |
commandId | String : ID คำสั่งคลัสเตอร์ |
getTestContext
public abstract TestContext getTestContext (String requestId,
String commandId)
พารามิเตอร์ |
---|
requestId | String |
commandId | String |
getTestEnvironment
public abstract TestEnvironment getTestEnvironment (String requestId)
รับ TestEnvironment
สำหรับการร้องขอ
ขว้าง |
---|
| IOข้อยกเว้น |
| org.json.JSONException |
JSONException | |
getTestResources
public abstract getTestResources (String requestId)
รับ TestResource
สำหรับการร้องขอ
ขว้าง |
---|
| IOข้อยกเว้น |
| org.json.JSONException |
JSONException | |
เช่าHostCommands
public abstract leaseHostCommands (String clusterId,
String hostname,
devices,
nextClusterIds,
int maxTasksTolease)
Lease ClusterCommand
สำหรับโฮสต์ที่ให้
พารามิเตอร์ |
---|
clusterId | String : รหัสคลัสเตอร์สำหรับโฮสต์ |
hostname | String : ชื่อโฮสต์ |
devices | : deviceInfos ที่โฮสต์มี |
nextClusterIds | : รายการ ID คลัสเตอร์ถัดไปที่จะเช่าคำสั่ง |
maxTasksTolease | int : จำนวนงานสูงสุดที่สามารถเช่าได้ในปัจจุบัน |
ขว้าง |
---|
| org.json.JSONException |
JSONException | |
อัพเดต TestContext
public abstract void updateTestContext (String requestId,
String commandId,
TestContext testContext)
พารามิเตอร์ |
---|
requestId | String |
commandId | String |
testContext | TestContext |