ClusterClient

public class ClusterClient
extends Object implements IClusterClient

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


Un'implementazione IClusterClient per l'interazione con il backend TFC.

Riepilogo

Costruttori pubblici

ClusterClient ()

Metodi pubblici

IClusterEventUploader < ClusterCommandEvent > getCommandEventUploader ()

Ottieni un IClusterEventUploader che può essere utilizzato per caricare ClusterCommandEvent s.

ClusterCommand.State getCommandState (String requestId, String commandId)

Determinare lo stato di un comando cluster.

ClusterCommandStatus getCommandStatus (String requestId, String commandId)

Ottenere lo stato del comando di un comando cluster (lo stato e il motivo dell'annullamento se annullato).

IClusterEventUploader < ClusterHostEvent > getHostEventUploader ()

Ottieni un IClusterEventUploader che può essere utilizzato per caricare ClusterHostEvent s.

TestContext getTestContext (String requestId, String commandId)

TestEnvironment getTestEnvironment (String requestId)

Ottenere TestEnvironment per una richiesta.

getTestResources (String requestId)

Ottieni TestResource s per una richiesta.

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)

Lease ClusterCommand per l'host give.

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

Costruttori pubblici

ClusterClient

public ClusterClient ()

Metodi pubblici

getCommandEventUploader

public IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

Ottieni un IClusterEventUploader che può essere utilizzato per caricare ClusterCommandEvent s.

ritorna
IClusterEventUploader < ClusterCommandEvent >

getCommandState

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

Determinare lo stato di un comando cluster.

Parametri
requestId String : ID richiesta cluster

commandId String : ID comando cluster

ritorna
ClusterCommand.State stato del comando cluster o ClusterCommand.State#UNKNOWN se non è stato possibile determinare lo stato

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

Ottenere lo stato del comando di un comando cluster (lo stato e il motivo dell'annullamento se annullato).

Parametri
requestId String : ID richiesta cluster

commandId String : ID comando cluster

ritorna
ClusterCommandStatus un ClusterCommandStatus che rappresenta lo stato e il motivo dell'annullamento se il comando viene annullato. Lo stato è ClusterCommand.State#UNKNOWN se non è stato possibile determinarlo.

getHostEventUploader

public IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

Ottieni un IClusterEventUploader che può essere utilizzato per caricare ClusterHostEvent s.

ritorna
IClusterEventUploader < ClusterHostEvent >

getTestContext

public TestContext getTestContext (String requestId, 
                String commandId)

Parametri
requestId String

commandId String

ritorna
TestContext

Getta
JSONException

getTestEnvironment

public TestEnvironment getTestEnvironment (String requestId)

Ottenere TestEnvironment per una richiesta.

ritorna
TestEnvironment un oggetto TestEnvironment .

Getta
JSONException

getTestResources

public  getTestResources (String requestId)

Ottieni TestResource s per una richiesta.

ritorna
un elenco di TestResource .

Getta
JSONException

leaseHostCommands

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

Lease ClusterCommand per l'host give.

Parametri
clusterId String : ID cluster per l'host

hostname String : nome host

deviceInfos : deviceInfos dell'host

nextClusterIds : un elenco dei prossimi ID cluster da cui prendere in prestito i comandi.

maxTasksTolease int : il numero massimo di attività che possono essere attualmente affittate

ritorna
un elenco di ClusterCommand

Getta
JSONException

updateTestContext

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

Parametri
requestId String

commandId String

testContext TestContext

Getta
JSONException