คลัสเตอร์ไคลเอ็นต์
public class ClusterClient
extends Object
implements IClusterClient
java.lang.Object |
↳ | com.android.tradefed.cluster.ClusterClient |
การใช้งาน IClusterClient
สำหรับการโต้ตอบกับแบ็กเอนด์ TFC
สรุป
วิธีการสาธารณะ |
---|
IClusterEventUploader < ClusterCommandEvent > | getCommandEventUploader () รับ IClusterEventUploader ที่สามารถใช้เพื่ออัปโหลด ClusterCommandEvent |
ClusterCommand.State | getCommandState (String requestId, String commandId) กำหนดสถานะของคำสั่งคลัสเตอร์ |
ClusterCommandStatus | getCommandStatus (String requestId, String commandId) รับสถานะคำสั่งของคำสั่งคลัสเตอร์ (สถานะและเหตุผลในการยกเลิกหากยกเลิก) |
IClusterEventUploader < ClusterHostEvent > | getHostEventUploader () รับ IClusterEventUploader ที่สามารถใช้เพื่ออัปโหลด ClusterHostEvent |
TestContext | getTestContext (String requestId, String commandId) |
TestEnvironment | getTestEnvironment (String requestId) รับ TestEnvironment สำหรับการร้องขอ |
| getTestResources (String requestId) รับ TestResource สำหรับการร้องขอ |
| leaseHostCommands (String clusterId, String hostname, deviceInfos, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, deviceInfos, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, deviceInfos, nextClusterIds, int maxTasksTolease) Lease ClusterCommand สำหรับโฮสต์ที่ให้ |
void | updateTestContext (String requestId, String commandId, TestContext testContext) |
ผู้รับเหมาก่อสร้างสาธารณะ
คลัสเตอร์ไคลเอ็นต์
public ClusterClient ()
วิธีการสาธารณะ
รับCommandState
public 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 TestContext getTestContext (String requestId,
String commandId)
พารามิเตอร์ |
---|
requestId | String |
commandId | String |
getTestResources
public getTestResources (String requestId)
รับ TestResource
สำหรับการร้องขอ
เช่าHostCommands
public leaseHostCommands (String clusterId,
String hostname,
deviceInfos,
nextClusterIds,
int maxTasksTolease)
Lease ClusterCommand
สำหรับโฮสต์ที่ให้
พารามิเตอร์ |
---|
clusterId | String : รหัสคลัสเตอร์สำหรับโฮสต์ |
hostname | String : ชื่อโฮสต์ |
deviceInfos | : deviceInfos ที่โฮสต์มี |
nextClusterIds | : รายการ ID คลัสเตอร์ถัดไปที่จะเช่าคำสั่ง |
maxTasksTolease | int : จำนวนงานสูงสุดที่สามารถเช่าได้ในปัจจุบัน |
อัพเดต TestContext
public void updateTestContext (String requestId,
String commandId,
TestContext testContext)
พารามิเตอร์ |
---|
requestId | String |
commandId | String |
testContext | TestContext |