Klient ICluster

public interface IClusterClient

com.android.tradefed.cluster.IClusterClient


Interfejs do interakcji z backendem TFC.

Streszczenie

Stałe

String TYPE_NAME

Unikalna nazwa typu obiektu konfiguracyjnego.

Metody publiczne

abstract IClusterEventUploader < ClusterCommandEvent > getCommandEventUploader ()

Pobierz IClusterEventUploader , którego można użyć do przesłania zdarzenia ClusterCommandEvent .

abstract ClusterCommand.State getCommandState (String requestId, String commandId)

Określ stan polecenia klastra.

default ClusterCommandStatus getCommandStatus (String requestId, String commandId)

Uzyskaj status polecenia klastra (stan i przyczynę anulowania, jeśli anulowano).

abstract IClusterEventUploader < ClusterHostEvent > getHostEventUploader ()

Pobierz IClusterEventUploader , którego można użyć do przesłania zdarzenia ClusterHostEvent .

abstract TestContext getTestContext (String requestId, String commandId)
abstract TestEnvironment getTestEnvironment (String requestId)

Pobierz TestEnvironment na żądanie.

abstract getTestResources (String requestId)

Pobierz TestResource s na żądanie.

abstract leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease) leaseHostCommands (String clusterId, String hostname, devices, nextClusterIds, int maxTasksTolease)

Wydzierżawij polecenie ClusterCommand dla hosta przekazującego.

abstract void updateTestContext (String requestId, String commandId, TestContext testContext)

Stałe

WPISZ IMIĘ

public static final String TYPE_NAME

Unikalna nazwa typu obiektu konfiguracyjnego. Służy do pobierania instancji singletonu z GlobalConfiguration .

Stała wartość: „cluster_client”

Metody publiczne

getCommandEventUploader

public abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

Pobierz IClusterEventUploader , którego można użyć do przesłania zdarzenia ClusterCommandEvent .

Zwroty
IClusterEventUploader < ClusterCommandEvent >

pobierz stan polecenia

public abstract ClusterCommand.State getCommandState (String requestId, 
                String commandId)

Określ stan polecenia klastra.

Parametry
requestId String : identyfikator żądania klastra

commandId String : identyfikator polecenia klastra

Zwroty
ClusterCommand.State stan polecenia klastra lub ClusterCommand.State#UNKNOWN , jeśli nie można określić stanu

pobierzStatusPolecenia

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

Uzyskaj status polecenia klastra (stan i przyczynę anulowania, jeśli anulowano).

Parametry
requestId String : identyfikator żądania klastra

commandId String : identyfikator polecenia klastra

Zwroty
ClusterCommandStatus ClusterCommandStatus, który reprezentuje stan i przyczynę anulowania, jeśli polecenie zostanie anulowane. Stan to ClusterCommand.State#UNKNOWN jeśli nie można go określić.

getHostEventUploader

public abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

Pobierz IClusterEventUploader , którego można użyć do przesłania zdarzenia ClusterHostEvent .

Zwroty
IClusterEventUploader < ClusterHostEvent >

pobierz kontekst testowy

public abstract TestContext getTestContext (String requestId, 
                String commandId)

Parametry
requestId String

commandId String

Zwroty
TestContext

Rzuca
JSONException

pobierz środowisko testowe

public abstract TestEnvironment getTestEnvironment (String requestId)

Pobierz TestEnvironment na żądanie.

Zwroty
TestEnvironment obiekt TestEnvironment .

Rzuca
Wyjątek IO
org.json.JSONException
JSONException

pobierz zasoby testowe

public abstract  getTestResources (String requestId)

Pobierz TestResource s na żądanie.

Zwroty
lista TestResource .

Rzuca
Wyjątek IO
org.json.JSONException
JSONException

Polecenia leasingHost

public abstract  leaseHostCommands (String clusterId, 
                String hostname, 
                 devices, 
                 nextClusterIds, 
                int maxTasksTolease)

Wydzierżawij polecenie ClusterCommand dla hosta przekazującego.

Parametry
clusterId String : identyfikator klastra dla hosta

hostname String : nazwa hosta

devices : informacje o urządzeniu, które posiada host

nextClusterIds : lista kolejnych identyfikatorów klastrów, z których można dzierżawić polecenia.

maxTasksTolease int : maksymalna liczba zadań, które można aktualnie dzierżawić

Zwroty
lista ClusterCommand

Rzuca
org.json.JSONException
JSONException

aktualizacjaTestContext

public abstract void updateTestContext (String requestId, 
                String commandId, 
                TestContext testContext)

Parametry
requestId String

commandId String

testContext TestContext

Rzuca
JSONException