集群设备监视器
public class ClusterDeviceMonitor
extends LabResourceDeviceMonitor
对象 | |||
↳ | com.google.dualhomelab.monitoringagent.resourcemonitoring.LabResourceServiceGrpc.LabResourceServiceImplBase | ||
↳ | com.android.tradefed.monitoring.LabResourceDeviceMonitor | ||
↳ | com.android.tradefed.cluster.ClusterDeviceMonitor |
一个IDeviceMonitor
实现,结果报告给Tradefed群集服务。
概括
公共构造函数 | |
---|---|
ClusterDeviceMonitor () |
公共方法 | |
---|---|
void | notifyDeviceStateChange (String serial, DeviceAllocationState oldState, DeviceAllocationState newState) 信号 |
void | run () 在设置了所有 Monitor 的 @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 ()
在设置了所有 Monitor 的 @Option 字段后将调用的方法。
设置设备列表
public void setDeviceLister (IDeviceMonitor.DeviceLister lister)
允许DeviceLister
进行设置。在成功尝试设置 Lister 后,实现可能会丢弃所有后续尝试。
参数 | |
---|---|
lister | IDeviceMonitor.DeviceLister |
停止
public void stop ()
当需要停止 Monitor 时将调用的方法。