public class Load extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Load.Builder
|
Constructor and Description |
---|
Load()
Package constructor for load with given load properties.
|
Modifier and Type | Method and Description |
---|---|
static Load.Builder |
builder() |
double |
expectedUtilizationFor(Resource resource) |
static double |
expectedUtilizationFor(Resource resource,
AggregatedMetricValues aggregatedMetricValues,
boolean ignoreMissingMetric)
Get a single snapshot value that is representative for the given resource.
|
Map<String,Object> |
getJsonStructure()
Return an object that can be further used
to encode into JSON
|
boolean |
isEqual(Load other) |
boolean |
isInitialized() |
AggregatedMetricValues |
loadByWindows()
Get load by their window time.
|
int |
numWindows()
Get the number of windows in the load.
|
String |
toString()
Get string representation of
Load . |
List<Long> |
windows()
Get the windows list for the load.
|
void |
writeTo(OutputStream out)
Output writing string representation of this class to the stream.
|
public static Load.Builder builder()
public AggregatedMetricValues loadByWindows()
public int numWindows()
public double expectedUtilizationFor(Resource resource)
public boolean isInitialized()
public Map<String,Object> getJsonStructure()
public void writeTo(OutputStream out) throws IOException
out
- the output stream.IOException
public boolean isEqual(Load other)
public static double expectedUtilizationFor(Resource resource, AggregatedMetricValues aggregatedMetricValues, boolean ignoreMissingMetric)
resource
- Resource for which the expected utilization will be provided.aggregatedMetricValues
- the aggregated metric values to calculate the expected utilization.ignoreMissingMetric
- whether it is allowed for the value of the given resource to be missing.
If the value of the given resource is not found, when set to true, 0 will be returned.
Otherwise, an exception will be thrown.