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


向 Tradefed Cluster 服务报告结果的 IDeviceMonitor 实现。

摘要

公共构造函数

ClusterDeviceMonitor()

公共方法

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

IDeviceMonitor 发送设备状态已更改的信号。

void run()

在设置监视器的所有 @Option 字段后调用的方法。

void setDeviceLister(IDeviceMonitor.DeviceLister lister)

允许设置 DeviceLister

void stop()

当需要停止监视器时调用的方法。

公共构造函数

ClusterDeviceMonitor

public ClusterDeviceMonitor ()

公共方法

notifyDeviceStateChange

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

IDeviceMonitor 发送设备状态已更改的信号。 监视器实现应限制在此方法中执行的处理量和 IDeviceManager/DeviceLister 互动量。

参数
serial String

oldState DeviceAllocationState

newState DeviceAllocationState

得分

public void run ()

在设置监视器的所有 @Option 字段后调用的方法。

setDeviceLister

public void setDeviceLister (IDeviceMonitor.DeviceLister lister)

允许设置 DeviceLister。成功尝试设置 Lister 后,实现可能会舍弃所有后续尝试。

参数
lister IDeviceMonitor.DeviceLister

停止

public void stop ()

当需要停止监视器时调用的方法。