IClusterClient

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 List<TestResource> getTestResources(String requestId)

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

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

เวลาได้รับสิทธิ์ ClusterCommand สำหรับโฮสต์ที่ระบุ

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 ได้

การคืนสินค้า
IClusterEventUploader<ClusterCommandEvent>

getCommandState

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

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

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

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

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

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

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

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

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

การคืนสินค้า
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

ส่ง
IOException
JSONException

getTestEnvironment

public abstract TestEnvironment getTestEnvironment (String requestId)

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

การคืนสินค้า
TestEnvironment ออบเจ็กต์ TestEnvironment

ส่ง
java.io.IOException
org.json.JSONException
IOException
JSONException

getTestResources

public abstract List<TestResource> getTestResources (String requestId)

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

การคืนสินค้า
List<TestResource> รายการ TestResource

ส่ง
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)

เวลาได้รับสิทธิ์ ClusterCommand สำหรับโฮสต์ที่ระบุ

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

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

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

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

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

การคืนสินค้า
List<ClusterCommand> รายการ ClusterCommand

ส่ง
org.json.JSONException
JSONException

updateTestContext

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

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

commandId String

testContext TestContext

ส่ง
IOException
JSONException