ClusterClient
public class ClusterClient
extends Object
implements IClusterClient
java.lang.Objek |
↳ | com.android.tradefed.cluster.ClusterClient |
Implementasi IClusterClient
untuk berinteraksi dengan backend TFC.
Ringkasan
Metode publik |
---|
IClusterEventUploader < ClusterCommandEvent > | getCommandEventUploader () Dapatkan IClusterEventUploader yang dapat digunakan untuk mengunggah ClusterCommandEvent s. |
ClusterCommand.State | getCommandState (String requestId, String commandId) Tentukan status perintah cluster. |
ClusterCommandStatus | getCommandStatus (String requestId, String commandId) Dapatkan status perintah dari perintah klaster (status dan alasan pembatalan jika dibatalkan). |
IClusterEventUploader < ClusterHostEvent > | getHostEventUploader () Dapatkan IClusterEventUploader yang dapat digunakan untuk mengunggah ClusterHostEvent s. |
TestContext | getTestContext (String requestId, String commandId) |
TestEnvironment | getTestEnvironment (String requestId) Dapatkan TestEnvironment untuk permintaan. |
| getTestResources (String requestId) Dapatkan TestResource s untuk permintaan. |
| 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) Sewa ClusterCommand untuk memberi host. |
void | updateTestContext (String requestId, String commandId, TestContext testContext) |
Konstruktor publik
ClusterClient
public ClusterClient ()
Metode publik
getCommandState
public ClusterCommand.State getCommandState (String requestId,
String commandId)
Tentukan status perintah cluster.
Parameter |
---|
requestId | String : ID permintaan klaster |
commandId | String : ID perintah klaster |
getCommandStatus
public ClusterCommandStatus getCommandStatus (String requestId,
String commandId)
Dapatkan status perintah dari perintah klaster (status dan alasan pembatalan jika dibatalkan).
Parameter |
---|
requestId | String : ID permintaan klaster |
commandId | String : ID perintah klaster |
getTestContext
public TestContext getTestContext (String requestId,
String commandId)
Parameter |
---|
requestId | String |
commandId | String |
getTestResources
public getTestResources (String requestId)
Dapatkan TestResource
s untuk permintaan.
perintah leaseHost
public leaseHostCommands (String clusterId,
String hostname,
deviceInfos,
nextClusterIds,
int maxTasksTolease)
Sewa ClusterCommand
untuk memberi host.
Parameter |
---|
clusterId | String : cluster id untuk host |
hostname | String : nama host |
deviceInfos | : deviceInfos yang dimiliki tuan rumah |
nextClusterIds | : daftar ID cluster berikutnya untuk menyewakan perintah. |
maxTasksTolease | int : jumlah maksimum tugas yang dapat disewa saat ini |
updateTestContext
public void updateTestContext (String requestId,
String commandId,
TestContext testContext)
Parameter |
---|
requestId | String |
commandId | String |
testContext | TestContext |