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żyć do przesyłania ClusterCommandEvent.

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

Określ stan polecenia klastra.

default ClusterCommandStatus getCommandStatus(String requestId, String commandId)

Pobierz stan polecenia klastra (stan i przyczynę anulowania, jeśli zostało anulowane).

abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader()

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

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

Uzyskaj TestEnvironment za prośbę.

abstract List<TestResource> getTestResources(String requestId)

Uzyskaj TestResource dla prośby.

abstract List<ClusterCommand> leaseHostCommands(String clusterId, String hostname, List<ClusterDeviceInfo> devices, List<String> nextClusterIds, int maxTasksTolease)

Dzierżawa ClusterCommand dla podanego 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żyć do przesyłania ClusterCommandEvent.

Zwraca
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

Zwraca
ClusterCommand.State stan polecenia klastra lub ClusterCommand.State.UNKNOWN, jeśli nie udało się określić stanu.

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

Pobierz stan polecenia klastra (stan i przyczynę anulowania, jeśli zostało anulowane).

Parametry
requestId String: identyfikator żądania klastra

commandId String: identyfikator polecenia klastra

Zwraca
ClusterCommandStatus obiekt ClusterCommandStatus, który reprezentuje stan i przyczynę anulowania, jeśli polecenie zostało anulowane. Jeśli nie udało się określić stanu, jest on ClusterCommand.State.UNKNOWN.

getHostEventUploader

public abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

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

Zwraca
IClusterEventUploader<ClusterHostEvent>

getTestContext

public abstract TestContext getTestContext (String requestId, 
                String commandId)

Parametry
requestId String

commandId String

Zwraca
TestContext

Zgłasza
IOException
JSONException

getTestEnvironment

public abstract TestEnvironment getTestEnvironment (String requestId)

Uzyskaj TestEnvironment za prośbę.

Zwraca
TestEnvironment obiekt TestEnvironment.

Zgłasza
java.io.IOException
org.json.JSONException
IOException
JSONException

getTestResources

public abstract List<TestResource> getTestResources (String requestId)

Uzyskaj TestResource dla prośby.

Zwraca
List<TestResource> listę TestResource.

Zgłasza
java.io.IOException
org.json.JSONException
IOException
JSONException

leaseHostCommands

public abstract List<ClusterCommand> leaseHostCommands (String clusterId, 
                String hostname, 
                List<ClusterDeviceInfo> devices, 
                List<String> nextClusterIds, 
                int maxTasksTolease)

Dzierżawa ClusterCommand dla podanego hosta.

Parametry
clusterId String: identyfikator klastra hosta.

hostname String: nazwa hosta

devices List: deviceInfos hosta

nextClusterIds List: lista identyfikatorów następnych klastrów, z których mają być pobierane polecenia.

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

Zwraca
List<ClusterCommand> listę ClusterCommand,

Zgłasza
org.json.JSONException
JSONException

updateTestContext

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

Parametry
requestId String

commandId String

testContext TestContext

Zgłasza
IOException
JSONException