Package org.cloudsimplus.slametrics
Class SlaMetricDimension
- java.lang.Object
-
- org.cloudsimplus.slametrics.SlaMetricDimension
-
public final class SlaMetricDimension extends Object
Represents a value for a specific metric of a SLA contract, following the format defined by the AWS CloudWatch.Each dimension contains the name of the metric, the minimum and maximum acceptable values, and the metric unit. Each metric may have multiple dimensions.
For more details, check Raysa Oliveira's Master Thesis (only in Portuguese).
- Author:
- raysaoliveira
-
-
Constructor Summary
Constructors Constructor Description SlaMetricDimension()
SlaMetricDimension(double value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
String
getUnit()
Gets the unit of the dimension, if "Percent" or "Absolute".double
getValue()
Gets the value of the dimension, in absolute or percentage, according to thegetUnit()
.boolean
isMaxValue()
boolean
isMinValue()
boolean
isPercent()
Checks if the unit is defined in percentage values.SlaMetricDimension
setName(String name)
SlaMetricDimension
setUnit(String unit)
SlaMetricDimension
setValue(double value)
String
toString()
-
-
-
Method Detail
-
getName
public String getName()
-
setName
public SlaMetricDimension setName(String name)
-
getValue
public double getValue()
Gets the value of the dimension, in absolute or percentage, according to thegetUnit()
.When the unit is "Percent", the values are defined in scale from 0 to 100%, but they are stored in this class in scale from 0 to 1, because everywhere percentage values are defined in this scale.
- Returns:
-
setValue
public SlaMetricDimension setValue(double value)
-
isMaxValue
public boolean isMaxValue()
-
isMinValue
public boolean isMinValue()
-
isPercent
public boolean isPercent()
Checks if the unit is defined in percentage values.- Returns:
-
getUnit
public String getUnit()
Gets the unit of the dimension, if "Percent" or "Absolute". When the unit is "Percent", the values are defined in scale from 0 to 100%, but they are stored in this class in scale from 0 to 1, because everywhere percentage values are defined in this scale.- Returns:
-
setUnit
public SlaMetricDimension setUnit(String unit)
-
-