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ğı monitörü. Kaynak metriği toplayıcıları eklemek için lütfen toplayıcıları yüklemek üzere global yapılandırmada Resources_metric_collector etiketlerini ekleyin.

Özet

Sabitler

int DEFAULT_PORT

int DEFAULT_THREAD_COUNT

float FIXED_METRIC_VALUE

Alanlar

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

Kamu inşaatçıları

LabResourceDeviceMonitor ()

Genel yöntemler

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

GRPC istek işleyicisi.

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

IDeviceMonitor bir aygıt durumunun değiştirildiğini bildirir.

void run ()

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

void setDeviceLister ( IDeviceMonitor.DeviceLister lister)

DeviceLister ayarlanmasına izin verir.

void stop ()

Monitörün durdurulması gerektiğinde çağrılacak bir yöntem.

Korumalı 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

Alanlar

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

Kamu inşaatçıları

LabResourceDeviceMonitor

public LabResourceDeviceMonitor ()

Genel 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 bir aygıt durumunun değiştirildiğini bildirir. Monitör uygulamaları, bu yöntemde yaptıkları işlem miktarını ve IDeviceManager/DeviceLister etkileşimini sınırlamalıdır.

Parametreler
serial String

oldState DeviceAllocationState

newState DeviceAllocationState

koşmak

public void run ()

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

setDeviceLister

public void setDeviceLister (IDeviceMonitor.DeviceLister lister)

DeviceLister ayarlanmasına izin verir. Lister'ı başarılı bir şekilde ayarlama girişiminden sonra uygulamalar sonraki tüm girişimleri iptal edebilir.

Parametreler
lister IDeviceMonitor.DeviceLister

durmak

public void stop ()

Monitörün durdurulması gerektiğinde çağrılacak bir yöntem.

Korumalı yöntemler

getCachedLabResource

protected LabResource getCachedLabResource ()

İadeler
LabResource