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

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"

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

getCommandEventUploader

public abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

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

การส่งคืน
IClusterEventUploader < ClusterCommandEvent >

รับCommandState

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

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

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

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

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

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

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

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

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

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

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

getHostEventUploader

public abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

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

การส่งคืน
IClusterEventUploader < ClusterHostEvent >

getTestContext

public abstract TestContext getTestContext (String requestId, 
                String commandId)

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

commandId String

การส่งคืน
TestContext

ขว้าง
JSONException

getTestEnvironment

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

เช่าHostCommands

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

Lease ClusterCommand สำหรับโฮสต์ที่ให้

พารามิเตอร์
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