IClusterClient

public interface IClusterClient

com.android.tradefed.cluster.IClusterClient


Una interfaz para interactuar con el backend de TFC.

Resumen

Constantes

String TYPE_NAME

El nombre único del tipo de objeto de configuración.

Métodos públicos

abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader()

Obtén un IClusterEventUploader que se pueda usar para subir ClusterCommandEvent.

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

Determina el estado de un comando de clúster.

default ClusterCommandStatus getCommandStatus(String requestId, String commandId)

Obtén el estado de un comando de clúster (el estado y el motivo de cancelación, si corresponde).

abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader()

Obtén un IClusterEventUploader que se pueda usar para subir ClusterHostEvent.

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

Obtén TestEnvironment para una solicitud.

abstract getTestResources(String requestId)

Obtén TestResource para una solicitud.

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

Alquila ClusterCommand para el host determinado.

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

Constantes

TYPE_NAME

public static final String TYPE_NAME

El nombre único del tipo de objeto de configuración. Se usa para recuperar la instancia singleton del GlobalConfiguration.

Valor constante: "cluster_client"

Métodos públicos

getCommandEventUploader

public abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

Obtén un IClusterEventUploader que se pueda usar para subir ClusterCommandEvent.

Muestra
IClusterEventUploader<ClusterCommandEvent>

getCommandState

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

Determina el estado de un comando de clúster.

Parámetros
requestId String: ID de la solicitud del clúster

commandId String: ID del comando del clúster

Muestra
ClusterCommand.State el estado del comando de clúster o ClusterCommand.State.UNKNOWN si no se pudo determinar el estado

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

Obtén el estado de un comando de clúster (el estado y el motivo de cancelación, si corresponde).

Parámetros
requestId String: ID de la solicitud del clúster

commandId String: ID del comando del clúster

Muestra
ClusterCommandStatus Un ClusterCommandStatus que representa el estado y el motivo de cancelación si se cancela el comando. El estado es ClusterCommand.State.UNKNOWN si no se pudo determinar.

getHostEventUploader

public abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

Obtén un IClusterEventUploader que se pueda usar para subir ClusterHostEvent.

Muestra
IClusterEventUploader<ClusterHostEvent>

getTestContext

public abstract TestContext getTestContext (String requestId, 
                String commandId)

Parámetros
requestId String

commandId String

Muestra
TestContext

Arroja
JSONException

getTestEnvironment

public abstract TestEnvironment getTestEnvironment (String requestId)

Obtén TestEnvironment para una solicitud.

Muestra
TestEnvironment Un objeto TestEnvironment.

Arroja
IOException
org.json.JSONException
JSONException

getTestResources

public abstract  getTestResources (String requestId)

Obtén TestResource para una solicitud.

Muestra
una lista de TestResource.

Arroja
IOException
org.json.JSONException
JSONException

leaseHostCommands

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

Alquila ClusterCommand para el host determinado.

Parámetros
clusterId String: ID del clúster del host

hostname String: nombre de host

devices : deviceInfos que tiene el host

nextClusterIds : Es una lista de los próximos IDs de clúster de los que se arrendarán los comandos.

maxTasksTolease int: Es la cantidad máxima de tareas que se pueden arrendar actualmente.

Muestra
una lista de ClusterCommand

Arroja
org.json.JSONException
JSONException

updateTestContext

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

Parámetros
requestId String

commandId String

testContext TestContext

Arroja
JSONException