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()

שיטה שתופעל כשצריך להפסיק את המעקב.

קונסטרוקטורים גלויים לכולם

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 ב-Monitor.

setDeviceLister

public void setDeviceLister (IDeviceMonitor.DeviceLister lister)

מאפשרת להגדיר את DeviceLister. אחרי ניסיון מוצלח להגדרת ה-Lister, יכול להיות שההטמעות ימחקו את כל הניסיונות הבאים.

פרמטרים
lister IDeviceMonitor.DeviceLister

עצירת ביניים

public void stop ()

שיטה שתופעל כשצריך להפסיק את המעקב.