Class SlaMetricDimension

java.lang.Object
org.cloudsimplus.slametrics.SlaMetricDimension

public final class SlaMetricDimension extends Object
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 Details

    • SlaMetricDimension

      public SlaMetricDimension()
    • SlaMetricDimension

      public SlaMetricDimension(double value)
  • Method Details

    • 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 the getUnit().

      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:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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)