SlaMetricDimension

public final class SlaMetricDimension

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

Constructors

SlaMetricDimension

public SlaMetricDimension()

SlaMetricDimension

public SlaMetricDimension(double value)

Methods

getName

public String getName()

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.

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.

isMaxValue

public boolean isMaxValue()

isMinValue

public boolean isMinValue()

isPercent

public boolean isPercent()

Checks if the unit is defined in percentage values.

setName

public SlaMetricDimension setName(String name)

setUnit

public SlaMetricDimension setUnit(String unit)

setValue

public SlaMetricDimension setValue(double value)

toString

public String toString()