ClusterDeviceMonitor

public class ClusterDeviceMonitor
extends LabResourceDeviceMonitor

java.lang.Object
com.google.dualhomelab.monitoringagent.resourcemonitoring.LabResourceServiceGrpc.LabResourceServiceImplBase
com.android.tradefed.monitoring.LabResourceDeviceMonitor
com.android.tradefed.cluster.ClusterDeviceMonitor


การใช้งาน IDeviceMonitor ที่รายงานผลลัพธ์ไปยังบริการ Tradefed Cluster

สรุป

ผู้รับเหมาก่อสร้างสาธารณะ

ClusterDeviceMonitor ()

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

void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)

ส่งสัญญาณให้ IDeviceMonitor ว่าสถานะอุปกรณ์มีการเปลี่ยนแปลง

void run ()

เมธอดที่จะถูกเรียกหลังจากตั้งค่าฟิลด์ @Option ของ Monitor ทั้งหมดแล้ว

void setDeviceLister ( IDeviceMonitor.DeviceLister lister)

อนุญาตให้ DeviceLister ตั้งค่าได้

void stop ()

วิธีการที่จะเรียกเมื่อจำเป็นต้องหยุดการทำงานของ Monitor

ผู้รับเหมาก่อสร้างสาธารณะ

ClusterDeviceMonitor

public ClusterDeviceMonitor ()

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

แจ้ง DeviceStateChange

public void notifyDeviceStateChange (String serial, 
                DeviceAllocationState oldState, 
                DeviceAllocationState newState)

ส่งสัญญาณให้ IDeviceMonitor ว่าสถานะอุปกรณ์มีการเปลี่ยนแปลง การตรวจสอบการใช้งานควรจำกัดจำนวนการประมวลผลและการโต้ตอบของ IDeviceManager/DeviceLister ที่ทำในวิธีนี้

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

oldState DeviceAllocationState

newState DeviceAllocationState

วิ่ง

public void run ()

เมธอดที่จะถูกเรียกหลังจากตั้งค่าฟิลด์ @Option ของ Monitor ทั้งหมดแล้ว

ตั้งค่าDeviceLister

public void setDeviceLister (IDeviceMonitor.DeviceLister lister)

อนุญาตให้ DeviceLister ตั้งค่าได้ หลังจากพยายามตั้งค่า Lister สำเร็จ การใช้งานอาจละทิ้งความพยายามที่ตามมาทั้งหมด

พารามิเตอร์
lister IDeviceMonitor.DeviceLister

หยุด

public void stop ()

วิธีการที่จะเรียกเมื่อจำเป็นต้องหยุดการทำงานของ Monitor