IClusterClient

public interface IClusterClient

com.android.tradefed.cluster.IClusterClient


Un'interfaccia per interagire con il backend TFC.

Riepilogo

Costanti

String TYPE_NAME

Il nome univoco del tipo di oggetto di configurazione.

Metodi pubblici

abstract IClusterEventUploader < ClusterCommandEvent > getCommandEventUploader ()

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

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

Determinare lo stato di un comando cluster.

default ClusterCommandStatus getCommandStatus (String requestId, String commandId)

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

abstract IClusterEventUploader < ClusterHostEvent > getHostEventUploader ()

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

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

Ottenere TestEnvironment per una richiesta.

abstract getTestResources (String requestId)

Ottieni TestResource s per una richiesta.

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

Lease ClusterCommand per l'host give.

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

Costanti

TIPO_NOME

public static final String TYPE_NAME

Il nome univoco del tipo di oggetto di configurazione. Utilizzato per recuperare l'istanza singleton da GlobalConfiguration .

Valore costante: "cluster_client"

Metodi pubblici

getCommandEventUploader

public abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

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

ritorna
IClusterEventUploader < ClusterCommandEvent >

getCommandState

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

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

ritorna
IClusterEventUploader < ClusterHostEvent >

getTestContext

public abstract TestContext getTestContext (String requestId, 
                String commandId)

Parametri
requestId String

commandId String

ritorna
TestContext

Getta
JSONException

getTestEnvironment

public abstract TestEnvironment getTestEnvironment (String requestId)

Ottenere TestEnvironment per una richiesta.

ritorna
TestEnvironment un oggetto TestEnvironment .

Getta
IOException
org.json.JSONException
JSONException

getTestResources

public abstract  getTestResources (String requestId)

Ottenere TestResource s per una richiesta.

ritorna
un elenco di TestResource .

Getta
IOException
org.json.JSONException
JSONException

leaseHostCommands

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

Lease ClusterCommand per l'host give.

Parametri
clusterId String : ID cluster per l'host

hostname String : nome host

devices : 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
org.json.JSONException
JSONException

updateTestContext

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

Parametri
requestId String

commandId String

testContext TestContext

Getta
JSONException