ClusterClient

public class ClusterClient
extends Object implements IClusterClient

java.lang.Object
   ↳ com.android.tradefed.cluster.ClusterClient


Una implementación de IClusterClient para interactuar con el backend de TFC.

Resumen

Constructores públicos

ClusterClient()

Métodos públicos

IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader()

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

ClusterCommand.State getCommandState(String requestId, String commandId)

Determina el estado de un comando de clúster.

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).

IClusterEventUploader<ClusterHostEvent> getHostEventUploader()

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

TestContext getTestContext(String requestId, String commandId)

TestEnvironment getTestEnvironment(String requestId)

Obtén TestEnvironment para una solicitud.

getTestResources(String requestId)

Obtén TestResource para una solicitud.

leaseHostCommands(String clusterId, String hostname, deviceInfos, nextClusterIds, int maxTasksTolease)

Alquila ClusterCommand para el host determinado.

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

Constructores públicos

ClusterClient

public ClusterClient ()

Métodos públicos

getCommandEventUploader

public IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

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

Muestra
IClusterEventUploader<ClusterCommandEvent>

getCommandState

public 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 IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

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

Muestra
IClusterEventUploader<ClusterHostEvent>

getTestContext

public TestContext getTestContext (String requestId, 
                String commandId)

Parámetros
requestId String

commandId String

Muestra
TestContext

Arroja
JSONException

getTestEnvironment

public TestEnvironment getTestEnvironment (String requestId)

Obtén TestEnvironment para una solicitud.

Muestra
TestEnvironment Un objeto TestEnvironment.

Arroja
JSONException

getTestResources

public  getTestResources (String requestId)

Obtén TestResource para una solicitud.

Muestra
una lista de TestResource.

Arroja
JSONException

leaseHostCommands

public  leaseHostCommands (String clusterId, 
                String hostname, 
                 deviceInfos, 
                 nextClusterIds, 
                int maxTasksTolease)

Alquila ClusterCommand para el host determinado.

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

hostname String: nombre de host

deviceInfos : 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
JSONException

updateTestContext

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

Parámetros
requestId String

commandId String

testContext TestContext

Arroja
JSONException