LabResourceDeviceMonitor

public class LabResourceDeviceMonitor
extends LabResourceServiceGrpc.LabResourceServiceImplBase implements IDeviceMonitor

java.lang.Object
   ↳ com.google.dualhomelab.monitoringagent.resourcemonitoring.LabResourceServiceGrpc.LabResourceServiceImplBase
     ↳ com.android.tradefed.monitoring.LabResourceDeviceMonitor


LabResourceService için gRPC sunucusunu başlatan/yöneten laboratuvar kaynağı izleyicisi. Kaynak metrik toplayıcıları eklemek için lütfen toplayıcıları yüklemek üzere global yapılandırmaya resource_metric_collector etiketleri ekleyin.

Özet

Sabitler

int DEFAULT_PORT

int DEFAULT_THREAD_COUNT

float FIXED_METRIC_VALUE

Fields'ın oynadığı filmler

public static final String DEVICE_SERIAL_KEY

public static final String HARDWARE_REVISION_RESOURCE_NAME

public static final String HARNESS_VERSION_KEY

public static final String HOST_GROUP_KEY

public static final String HOST_NAME_KEY

public static final String LAB_NAME_KEY

public static final String POOL_ATTRIBUTE_NAME

public static final String RUN_TARGET_ATTRIBUTE_NAME

public static final String STATUS_RESOURCE_NAME

public static final String TEST_HARNESS_KEY

Herkese açık kurucular

LabResourceDeviceMonitor()

Herkese açık yöntemler

void getLabResource(LabResourceRequest request, StreamObserver<LabResource> responseObserver)

gRPC istek işleyicisi.

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

IDeviceMonitor'ye bir cihaz durumunun değiştiğini bildirir.

void run()

İzleyicinin tüm @Option alanları ayarlandıktan sonra çağrılacak bir yöntem.

void setDeviceLister(IDeviceMonitor.DeviceLister lister)

DeviceLister değerinin ayarlanmasına izin verir.

void stop()

İzleyici'nin durdurulması gerektiğinde çağrılacak bir yöntem.

Korunan yöntemler

LabResource getCachedLabResource()

Sabitler

DEFAULT_PORT

public static final int DEFAULT_PORT

Sabit Değer: 8887 (0x000022b7)

DEFAULT_THREAD_COUNT

public static final int DEFAULT_THREAD_COUNT

Sabit Değer: 1 (0x00000001)

FIXED_METRIC_VALUE

public static final float FIXED_METRIC_VALUE

Sabit Değer: 1.0

Fields'ın oynadığı filmler

DEVICE_SERIAL_KEY

public static final String DEVICE_SERIAL_KEY

HARDWARE_REVISION_RESOURCE_NAME

public static final String HARDWARE_REVISION_RESOURCE_NAME

HARNESS_VERSION_KEY

public static final String HARNESS_VERSION_KEY

HOST_GROUP_KEY

public static final String HOST_GROUP_KEY

HOST_NAME_KEY

public static final String HOST_NAME_KEY

LAB_NAME_KEY

public static final String LAB_NAME_KEY

POOL_ATTRIBUTE_NAME

public static final String POOL_ATTRIBUTE_NAME

RUN_TARGET_ATTRIBUTE_NAME

public static final String RUN_TARGET_ATTRIBUTE_NAME

STATUS_RESOURCE_NAME

public static final String STATUS_RESOURCE_NAME

TEST_HARNESS_KEY

public static final String TEST_HARNESS_KEY

Herkese açık kurucular

LabResourceDeviceMonitor

public LabResourceDeviceMonitor ()

Herkese açık yöntemler

getLabResource

public void getLabResource (LabResourceRequest request, 
                StreamObserver<LabResource> responseObserver)

gRPC istek işleyicisi.

Parametreler
request LabResourceRequest

responseObserver StreamObserver

notifyDeviceStateChange

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

IDeviceMonitor'ye bir cihaz durumunun değiştiğini bildirir. İzleme uygulamalarının, bu yöntemde yaptıkları işlem miktarını ve IDeviceManager/DeviceLister etkileşimini sınırlaması gerekir.

Parametreler
serial String

oldState DeviceAllocationState

newState DeviceAllocationState

çalıştır

public void run ()

İzleyicinin tüm @Option alanları ayarlandıktan sonra çağrılacak bir yöntem.

setDeviceLister

public void setDeviceLister (IDeviceMonitor.DeviceLister lister)

DeviceLister değerinin ayarlanmasına izin verir. Listeleyiciyi ayarlama denemesi başarılı olduktan sonra, uygulamalar sonraki tüm denemeleri atlayabilir.

Parametreler
lister IDeviceMonitor.DeviceLister

aktarma

public void stop ()

İzleyici'nin durdurulması gerektiğinde çağrılacak bir yöntem.

Korunan yöntemler

getCachedLabResource

protected LabResource getCachedLabResource ()

İlerlemeler
LabResource