集群設備監控器

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)

IDeviceMonitor發出設備狀態已更改的信號。

void run ()

設置監視器的所有@Option 字段後將調用的方法。

void setDeviceLister ( IDeviceMonitor.DeviceLister lister)

允許設置DeviceLister

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 時將調用的方法。