ClusterClient

public class ClusterClient
extends Object implements IClusterClient

java.lang.Objeto
com.android.tradefed.cluster.ClusterClient


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

Resumen

Constructores públicos

ClusterClient ()

Métodos públicos

IClusterEventUploader < ClusterCommandEvent > getCommandEventUploader ()

Obtenga un IClusterEventUploader que se puede usar para cargar ClusterCommandEvent s.

ClusterCommand.State getCommandState (String requestId, String commandId)

Determinar el estado de un comando de clúster.

ClusterCommandStatus getCommandStatus (String requestId, String commandId)

Obtenga el estado del comando de un comando de clúster (el estado y el motivo de cancelación si se canceló).

IClusterEventUploader < ClusterHostEvent > getHostEventUploader ()

Obtenga un IClusterEventUploader que se puede usar para cargar ClusterHostEvent s.

TestContext getTestContext (String requestId, String commandId)

TestEnvironment getTestEnvironment (String requestId)

Obtenga TestEnvironment para una solicitud.

getTestResources (String requestId)

Obtenga TestResource s para una solicitud.

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

Arrendamiento ClusterCommand para el host dado.

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

Constructores públicos

ClusterClient

public ClusterClient ()

Métodos públicos

getCommandEventUploader

public IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

Obtenga un IClusterEventUploader que se puede usar para cargar ClusterCommandEvent s.

Devoluciones
IClusterEventUploader < ClusterCommandEvent >

getCommandState

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

Determinar el estado de un comando de clúster.

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

commandId String : ID de comando de clúster

Devoluciones
ClusterCommand.State 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)

Obtenga el estado del comando de un comando de clúster (el estado y el motivo de cancelación si se cancela).

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

commandId String : ID de comando de clúster

Devoluciones
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 ()

Obtenga un IClusterEventUploader que se puede usar para cargar ClusterHostEvent s.

Devoluciones
IClusterEventUploader < ClusterHostEvent >

getTestContext

public TestContext getTestContext (String requestId, 
                String commandId)

Parámetros
requestId String

commandId String

Devoluciones
TestContext

Lanza
JSONException

getTestEnvironment

public TestEnvironment getTestEnvironment (String requestId)

Obtenga TestEnvironment para una solicitud.

Devoluciones
TestEnvironment un objeto TestEnvironment .

Lanza
JSONException

obtener recursos de prueba

public  getTestResources (String requestId)

Obtenga TestResource s para una solicitud.

Devoluciones
una lista de TestResource .

Lanza
JSONException

arrendamientoHostCommands

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

Arrendamiento ClusterCommand para el host dado.

Parámetros
clusterId String : ID de clúster para el host

hostname String : nombre de host

deviceInfos : deviceInfos que tiene el host

nextClusterIds : una lista de los siguientes ID de clúster para arrendar comandos.

maxTasksTolease int : el número máximo de tareas que se pueden arrendar actualmente

Devoluciones
una lista de ClusterCommand

Lanza
JSONException

actualizaciónTestContext

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

Parámetros
requestId String

commandId String

testContext TestContext

Lanza
JSONException