IClusterClient

public interface IClusterClient

com.android.tradefed.cluster.IClusterClient


Interfejs do interakcji z backendem TFC.

Podsumowanie

Stałe

String TYPE_NAME

Unikalna nazwa typu obiektu konfiguracji.

Metody publiczne

abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader()

Uzyskaj IClusterEventUploader, którego możesz używać do przesyłania ClusterCommandEvent.

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

Określ stan polecenia klastra.

default ClusterCommandStatus getCommandStatus(String requestId, String commandId)

Pobieranie stanu polecenia klastra (stan i przyczyna anulowania, jeśli zostało anulowane).

abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader()

Uzyskaj IClusterEventUploader, którego możesz używać do przesyłania ClusterHostEvent.

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

Uzyskaj TestEnvironment dla prośby.

abstract getTestResources(String requestId)

Uzyskaj TestResource dla prośby.

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

Leasing ClusterCommand dla danego hosta.

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

Stałe

TYPE_NAME

public static final String TYPE_NAME

Unikalna nazwa typu obiektu konfiguracji. Służy do pobierania instancji singletona z GlobalConfiguration.

Wartość stała: "cluster_client"

Metody publiczne

getCommandEventUploader

public abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

Uzyskaj IClusterEventUploader, którego możesz używać do przesyłania ClusterCommandEvent.

Zwroty
IClusterEventUploader<ClusterCommandEvent>

getCommandState

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 cluster, lub ClusterCommand.State.UNKNOWN, jeśli nie można określić stanu;

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

Pobieranie stanu polecenia klastra (stan i przyczyna anulowania, jeśli zostało anulowane).

Parametry
requestId String: identyfikator żądania klastra

commandId String: identyfikator polecenia klastra

Zwroty
ClusterCommandStatus ClusterCommandStatus, który reprezentuje stan i przyczynę anulowania polecenia, jeśli zostało anulowane. Jeśli stan nie został określony, jest on oznaczony jako ClusterCommand.State.UNKNOWN.

getHostEventUploader

public abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

Uzyskaj IClusterEventUploader, którego możesz używać do przesyłania ClusterHostEvent.

Zwroty
IClusterEventUploader<ClusterHostEvent>

getTestContext

public abstract TestContext getTestContext (String requestId, 
                String commandId)

Parametry
requestId String

commandId String

Zwroty
TestContext

Rzuty
JSONException

getTestEnvironment

public abstract TestEnvironment getTestEnvironment (String requestId)

Uzyskaj TestEnvironment dla prośby.

Zwroty
TestEnvironment obiekt TestEnvironment.

Rzuty
IOException
org.json.JSONException
JSONException

getTestResources

public abstract  getTestResources (String requestId)

Uzyskaj TestResource dla prośby.

Zwroty
lista TestResource.

Rzuty
IOException
org.json.JSONException
JSONException

leaseHostCommands

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

Leasing ClusterCommand dla danego hosta.

Parametry
clusterId String: identyfikator klastra hosta

hostname String: nazwa hosta

devices : informacje o urządzeniu hosta,

nextClusterIds : lista identyfikatorów kolejnych klastrów, z których mają być wypożyczane polecenia.

maxTasksTolease int: maksymalna liczba zadań, które można obecnie wydzierżać

Zwroty
lista wartości ClusterCommand

Rzuty
org.json.JSONException
JSONException

updateTestContext

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

Parametry
requestId String

commandId String

testContext TestContext

Rzuty
JSONException