Package org.cloudsimplus.slametrics
Class SlaMetricDimension
java.lang.Object
org.cloudsimplus.slametrics.SlaMetricDimension
Represents a value for a specific metric of an 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
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
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
boolean
boolean
Checks if the unit is defined in percentage values.setValue
(double value) toString()
-
Constructor Details
-
SlaMetricDimension
public SlaMetricDimension() -
SlaMetricDimension
public SlaMetricDimension(double value)
-
-
Method Details
-
getName
-
setName
-
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
-
isMaxValue
public boolean isMaxValue() -
isMinValue
public boolean isMinValue() -
isPercent
public boolean isPercent()Checks if the unit is defined in percentage values.- Returns:
-
toString
-
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
-