public class SystemMetrics extends Object implements PowerSerializable, Comparable<SystemMetrics>
| 构造器和说明 |
|---|
SystemMetrics() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
available(double minCPUCores,
double minMemorySpace,
double minDiskSpace)
Judge if the machine is available.
|
int |
calculateScore()
Calculate score, based on CPU and memory info.
|
int |
compareTo(SystemMetrics that)
Override compareTo.
|
public int compareTo(SystemMetrics that)
compareTo 在接口中 Comparable<SystemMetrics>that - the metrics that is to be compared with current.intpublic int calculateScore()
public boolean available(double minCPUCores,
double minMemorySpace,
double minDiskSpace)
minCPUCores - Minimum available CPU cores.minMemorySpace - Minimum available memory sizeminDiskSpace - Minimum disk spaceboolean whether the machine is available.Copyright © 2024. All rights reserved.