集群设备监控器
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 |
向 Tradefed 集群服务报告结果的IDeviceMonitor
实施。
概括
公共构造函数 | |
---|---|
ClusterDeviceMonitor () |
公共方法 | |
---|---|
void | notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState) 向 |
void | run () 设置监视器的所有@Option 字段后将调用的方法。 |
void | setDeviceLister ( IDeviceMonitor.DeviceLister lister) 允许设置 |
void | stop () 需要停止 Monitor 时将调用的方法。 |
公共构造函数
集群设备监控器
public ClusterDeviceMonitor ()
公共方法
通知设备状态变化
public void notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState)
向IDeviceMonitor
发出设备状态已更改的信号。监视器实现应限制它们在此方法中执行的处理量和 IDeviceManager/DeviceLister 交互。
参数 | |
---|---|
serial | String |
oldState | DeviceAllocationState |
newState | DeviceAllocationState |
跑步
public void run ()
设置监视器的所有@Option 字段后将调用的方法。
设置设备列表
public void setDeviceLister (IDeviceMonitor.DeviceLister lister)
允许设置DeviceLister
。在成功尝试设置 Lister 之后,实现可能会放弃所有后续尝试。
参数 | |
---|---|
lister | IDeviceMonitor.DeviceLister |
停止
public void stop ()
需要停止 Monitor 时将调用的方法。