IClusterClient

public interface IClusterClient

com.android.tradefed.cluster.IClusterClient


ממשק לאינטראקציה עם הקצה העורפי של TFC.

סיכום

קבועים

String TYPE_NAME

השם הייחודי של סוג אובייקט ההגדרה.

שיטות ציבוריות

abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader()

מקבלים IClusterEventUploader שאפשר להשתמש בו כדי להעלות ClusterCommandEvent.

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

בדיקת המצב של פקודת אשכולות.

default ClusterCommandStatus getCommandStatus(String requestId, String commandId)

הצגת סטטוס הפקודה של פקודה באשכול (המצב והסיבה לביטול, אם הפקודה בוטלה).

abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader()

מקבלים IClusterEventUploader שאפשר להשתמש בו כדי להעלות ClusterHostEvent.

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

אחזור של TestEnvironment לבקשה.

abstract getTestResources(String requestId)

אחזור TestResources של בקשה.

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

זיכיון ClusterCommand למארח הנתון.

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

קבועים

TYPE_NAME

public static final String TYPE_NAME

השם הייחודי של סוג אובייקט ההגדרה. משמש לאחזור מופע היחיד (singleton) מ-GlobalConfiguration.

ערך קבוע: "cluster_client"

שיטות ציבוריות

getCommandEventUploader

public abstract IClusterEventUploader<ClusterCommandEvent> getCommandEventUploader ()

מקבלים IClusterEventUploader שאפשר להשתמש בו כדי להעלות ClusterCommandEvent.

החזרות
IClusterEventUploader<ClusterCommandEvent>

getCommandState

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

בדיקת המצב של פקודת אשכולות.

פרמטרים
requestId String: מזהה הבקשה של האשכול

commandId String: מזהה הפקודה של האשכולות

החזרות
ClusterCommand.State הסטטוס של הפקודה באשכול, או ClusterCommand.State.UNKNOWN אם לא ניתן היה לקבוע את הסטטוס

getCommandStatus

public ClusterCommandStatus getCommandStatus (String requestId, 
                String commandId)

הצגת סטטוס הפקודה של פקודה באשכול (המצב והסיבה לביטול, אם הפקודה בוטלה).

פרמטרים
requestId String: מזהה הבקשה של האשכול

commandId String: מזהה הפקודה של האשכולות

החזרות
ClusterCommandStatus ClusterCommandStatus שמייצג את המצב ואת סיבה הביטול אם הפקודה מבוטלת. המצב הוא ClusterCommand.State.UNKNOWN אם לא ניתן היה לקבוע אותו.

getHostEventUploader

public abstract IClusterEventUploader<ClusterHostEvent> getHostEventUploader ()

מקבלים IClusterEventUploader שאפשר להשתמש בו כדי להעלות ClusterHostEvent.

החזרות
IClusterEventUploader<ClusterHostEvent>

getTestContext

public abstract TestContext getTestContext (String requestId, 
                String commandId)

פרמטרים
requestId String

commandId String

החזרות
TestContext

זריקות
JSONException

getTestEnvironment

public abstract TestEnvironment getTestEnvironment (String requestId)

אחזור של TestEnvironment לבקשה.

החזרות
TestEnvironment אובייקט TestEnvironment.

זריקות
IOException
org.json.JSONException
JSONException

getTestResources

public abstract  getTestResources (String requestId)

אחזור TestResources של בקשה.

החזרות
רשימה של TestResource.

זריקות
IOException
org.json.JSONException
JSONException

leaseHostCommands

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

זיכיון ClusterCommand למארח הנתון.

פרמטרים
clusterId String: מזהה האשכול של המארח

hostname String: hostname

devices : פרטי deviceInfos של המארח

nextClusterIds : רשימה של מזהי האשכולות הבאים שמהם יוקצו פקודות למימוש זיכיון.

maxTasksTolease int: המספר המקסימלי של משימות שאפשר כרגע להקצות ב-lease

החזרות
רשימה של ClusterCommand

זריקות
org.json.JSONException
JSONException

updateTestContext

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

פרמטרים
requestId String

commandId String

testContext TestContext

זריקות
JSONException