ClusterClient

public class ClusterClient
extends Object implements IClusterClient

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


TFC arka ucuyla etkileşim kurmak için IClusterClient uygulaması.

Özet

Herkese açık oluşturucular

ClusterClient()

Herkese açık yöntemler

IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader()

ClusterCommandEvent yüklemek için kullanılabilecek bir IClusterEventUploader alın.

ClusterCommand.State getCommandState(String requestId, String commandId)

Bir küme komutunun durumunu belirleyin.

ClusterCommandStatus getCommandStatus(String requestId, String commandId)

Bir küme komutunun komut durumunu (durum ve iptal edildiyse iptal nedeni) alın.

IClusterEventUploader<ClusterHostEvent> getHostEventUploader()

ClusterHostEvent yüklemek için kullanılabilecek bir IClusterEventUploader alın.

TestContext getTestContext(String requestId, String commandId)

TestEnvironment getTestEnvironment(String requestId)

Bir istek için TestEnvironment alın.

List<TestResource> getTestResources(String requestId)

Bir istek için TestResource alın.

List<ClusterCommand> leaseHostCommands(String clusterId, String hostname, List<ClusterDeviceInfo> deviceInfos, List<String> nextClusterIds, int maxTasksTolease)

Belirtilen ana makine için ClusterCommand kirası.

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

Herkese açık oluşturucular

ClusterClient

public ClusterClient ()

Herkese açık yöntemler

getCommandEventUploader

public IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

ClusterCommandEvent yüklemek için kullanılabilecek bir IClusterEventUploader alın.

İadeler
IClusterEventUploader<ClusterCommandEvent>

getCommandState

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

Bir küme komutunun durumunu belirleyin.

Parametreler
requestId String: küme isteği kimliği

commandId String: küme komutu kimliği

İadeler
ClusterCommand.State küme komutunun durumu veya durum belirlenemiyorsa ClusterCommand.State.UNKNOWN

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

Bir küme komutunun komut durumunu (durum ve iptal edildiyse iptal nedeni) alın.

Parametreler
requestId String: küme isteği kimliği

commandId String: küme komutu kimliği

İadeler
ClusterCommandStatus Komut iptal edildiyse durumu ve iptal nedenini temsil eden bir ClusterCommandStatus. Durum belirlenemiyorsa ClusterCommand.State.UNKNOWN olur.

getHostEventUploader

public IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

ClusterHostEvent yüklemek için kullanılabilecek bir IClusterEventUploader alın.

İadeler
IClusterEventUploader<ClusterHostEvent>

getTestContext

public TestContext getTestContext (String requestId, 
                String commandId)

Parametreler
requestId String

commandId String

Döndürülenler
TestContext

Verdiği hatalar
IOException
JSONException

getTestEnvironment

public TestEnvironment getTestEnvironment (String requestId)

Bir istek için TestEnvironment alın.

İadeler
TestEnvironment TestEnvironment nesnesi.

Verdiği hatalar
IOException
JSONException

getTestResources

public List<TestResource> getTestResources (String requestId)

Bir istek için TestResource alın.

İadeler
List<TestResource> TestResource listesi.

Verdiği hatalar
IOException
JSONException

leaseHostCommands

public List<ClusterCommand> leaseHostCommands (String clusterId, 
                String hostname, 
                List<ClusterDeviceInfo> deviceInfos, 
                List<String> nextClusterIds, 
                int maxTasksTolease)

Belirtilen ana makine için ClusterCommand kirası.

Parametreler
clusterId String: ana makinenin küme kimliği

hostname String: ana makine adı

deviceInfos List: ana makinenin sahip olduğu deviceInfos

nextClusterIds List: Komutların kiralanacağı sonraki küme kimliklerinin listesi.

maxTasksTolease int: Şu anda kiralanabilecek maksimum görev sayısı

İadeler
List<ClusterCommand> ClusterCommand listesi

Verdiği hatalar
JSONException

updateTestContext

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

Parametreler
requestId String

commandId String

testContext TestContext

Verdiği hatalar
IOException
JSONException