public class JobWorkerHealth extends Object
Constructor and Description |
---|
JobWorkerHealth(JobWorkerHealth jobWorkerHealth)
Constructor from the grpc representation.
|
JobWorkerHealth(long workerId,
List<Double> loadAverage,
int taskPoolSize,
int numActiveTasks,
int unfinishedTasks,
String hostname)
Default constructor.
|
JobWorkerHealth(long workerId,
List<Double> loadAverage,
int taskPoolSize,
int numActiveTasks,
int unfinishedTasks,
String hostname,
BuildVersion version)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getHostname() |
List<Double> |
getLoadAverage()
Returns system load average for 1, 5, and 15 minutes.
|
int |
getNumActiveTasks() |
int |
getTaskPoolSize() |
int |
getUnfinishedTasks() |
BuildVersion |
getVersion() |
long |
getWorkerId() |
int |
hashCode() |
JobWorkerHealth |
toProto() |
String |
toString() |
public JobWorkerHealth(long workerId, List<Double> loadAverage, int taskPoolSize, int numActiveTasks, int unfinishedTasks, String hostname)
workerId
- the worker idloadAverage
- output of CentralProcessor.getSystemLoadAverage on the workertaskPoolSize
- task pool sizenumActiveTasks
- number of active tasks in the workerunfinishedTasks
- number of unfinished tasks that the worker hashostname
- hostname of the workerpublic JobWorkerHealth(long workerId, List<Double> loadAverage, int taskPoolSize, int numActiveTasks, int unfinishedTasks, String hostname, BuildVersion version)
workerId
- the worker idloadAverage
- output of CentralProcessor.getSystemLoadAverage on the workertaskPoolSize
- task pool sizenumActiveTasks
- number of active tasks in the workerunfinishedTasks
- number of unfinished tasks that the worker hashostname
- hostname of the workerversion
- the worker's version infopublic JobWorkerHealth(JobWorkerHealth jobWorkerHealth)
jobWorkerHealth
- grpc representationpublic long getWorkerId()
public List<Double> getLoadAverage()
public int getTaskPoolSize()
public int getNumActiveTasks()
public int getUnfinishedTasks()
public String getHostname()
public BuildVersion getVersion()
public JobWorkerHealth toProto()
Copyright © 2023. All Rights Reserved.