ไอคลัสเตอร์ไคลเอนต์

public interface IClusterClient

com.android.tradefed.cluster.IClusterClient


อินเทอร์เฟซสำหรับการโต้ตอบกับแบ็กเอนด์ TFC

สรุป

ค่าคงที่

String TYPE_NAME

ชื่อประเภทอ็อบเจกต์คอนฟิกูเรชันเฉพาะ

วิธีการสาธารณะ

abstract IClusterEventUploader < ClusterCommandEvent > getCommandEventUploader ()

รับ IClusterEventUploader ที่สามารถใช้เพื่ออัปโหลด ClusterCommandEvent s

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

กำหนดสถานะของคำสั่งคลัสเตอร์

default ClusterCommandStatus getCommandStatus (String requestId, String commandId)

รับสถานะคำสั่งของคำสั่งคลัสเตอร์ (สถานะและเหตุผลการยกเลิกหากยกเลิก)

abstract IClusterEventUploader < ClusterHostEvent > getHostEventUploader ()

รับ IClusterEventUploader ที่สามารถใช้เพื่ออัปโหลด ClusterHostEvent s

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)

เช่า ClusterCommand สำหรับโฮสต์ Give

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

ค่าคงที่

TYPE_NAME

public static final String TYPE_NAME

ชื่อประเภทอ็อบเจกต์คอนฟิกูเรชันเฉพาะ ใช้เพื่อดึงอินสแตนซ์ singleton จาก GlobalConfiguration

ดูสิ่งนี้ด้วย:

ค่าคงที่: "cluster_client"

วิธีการสาธารณะ

getCommandEventUploader

public abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

รับ IClusterEventUploader ที่สามารถใช้เพื่ออัปโหลด ClusterCommandEvent s

ส่งคืน
IClusterEventUploader < ClusterCommandEvent >

getCommandState

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

กำหนดสถานะของคำสั่งคลัสเตอร์

พารามิเตอร์
requestId String : รหัสคำขอของคลัสเตอร์

commandId String : ID คำสั่งคลัสเตอร์

ส่งคืน
ClusterCommand.State สถานะของคำสั่งคลัสเตอร์ หรือ ClusterCommand.State#UNKNOWN หากไม่สามารถระบุสถานะได้

รับสถานะคำสั่ง

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

รับสถานะคำสั่งของคำสั่งคลัสเตอร์ (สถานะและเหตุผลการยกเลิกหากยกเลิก)

พารามิเตอร์
requestId String : รหัสคำขอของคลัสเตอร์

commandId String : ID คำสั่งคลัสเตอร์

ส่งคืน
ClusterCommandStatus ClusterCommandStatus ที่แสดงถึงสถานะและเหตุผลในการยกเลิกหากคำสั่งถูกยกเลิก สถานะคือ ClusterCommand.State#UNKNOWN หากไม่สามารถระบุได้

getHostEventUploader

public abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

รับ IClusterEventUploader ที่สามารถใช้เพื่ออัปโหลด ClusterHostEvent s

ส่งคืน
IClusterEventUploader < ClusterHostEvent >

รับการทดสอบบริบท

public abstract TestContext getTestContext (String requestId, 
                String commandId)

พารามิเตอร์
requestId String

commandId String

ส่งคืน
TestContext

พ่น
JSONException

รับการทดสอบสภาพแวดล้อม

public abstract TestEnvironment getTestEnvironment (String requestId)

รับ TestEnvironment สำหรับคำขอ

ส่งคืน
TestEnvironment วัตถุ TestEnvironment

พ่น
IOข้อยกเว้น
org.json.JSONException
JSONException

getTestResources

public abstract  getTestResources (String requestId)

รับ TestResource สำหรับคำขอ

ส่งคืน
รายการของ TestResource

พ่น
IOข้อยกเว้น
org.json.JSONException
JSONException

คำสั่งเช่าโฮสต์

public abstract  leaseHostCommands (String clusterId, 
                String hostname, 
                 devices, 
                 nextClusterIds, 
                int maxTasksTolease)

เช่า ClusterCommand สำหรับโฮสต์ Give

พารามิเตอร์
clusterId String : รหัสคลัสเตอร์สำหรับโฮสต์

hostname String : ชื่อโฮสต์

devices : deviceInfos ที่โฮสต์มี

nextClusterIds : รายการ ID คลัสเตอร์ถัดไปที่จะเช่าคำสั่งจาก

maxTasksTolease int : จำนวนงานสูงสุดที่สามารถเช่าได้ในปัจจุบัน

ส่งคืน
รายการของ ClusterCommand

พ่น
org.json.JSONException
JSONException

อัปเดต TestContext

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

พารามิเตอร์
requestId String

commandId String

testContext TestContext

พ่น
JSONException