public class MetricDescriptor extends AggregationMethodDescriptor<MetricDescriptor>
Metric
,
that will be used to control how the metric information is displayed.AggregationMethodDescriptor.RangeAggregationMethod, AggregationMethodDescriptor.SliceAggregationMethod
Constructor and Description |
---|
MetricDescriptor(java.lang.String type,
java.util.Map<java.lang.String,java.lang.String> translatedNames)
Constructs a
MetricDescriptor with all required descriptor attributes. |
Modifier and Type | Method and Description |
---|---|
MetricDescriptor |
addGroupDescriptor(MetricGroupDescriptor... descriptors) |
boolean |
equals(java.lang.Object obj) |
java.lang.Number |
getConcurrentDurationCap() |
java.lang.Number |
getDefaultValue()
Returns the value used in intervals where usage data is not sent
(e.g.
|
java.util.Set<MetricGroupDescriptor> |
getGroupDescriptors() |
java.lang.Number |
getMaxValue()
Returns the maximum value, for shaping Y axis in charts, or gauges (e.g.
|
java.lang.Number |
getMinValue()
Returns the minimum value, for shaping Y axis in charts, or gauges (e.g.
|
java.lang.String |
getName()
Returns the untranslated name
|
java.lang.Number |
getSharedDurationCap() |
java.util.Map<java.lang.String,java.lang.String> |
getTranslatedNames()
Returns the translated display names as a map where the key is the language and
the value is the translated name of the metric (e.g.
|
java.util.Map<java.lang.String,java.lang.String> |
getTranslatedUnits()
Returns the translated display units as a map where the key is the language and
the value is the translated unit of the metric (e.g.
|
java.lang.String |
getType()
Returns the unique identifier for the metric.
|
java.lang.String |
getUnits()
Returns the untranslated units
|
int |
hashCode() |
void |
setConcurrentDurationCap(java.lang.Number concurrentDurationCap) |
MetricDescriptor |
setDefaultValue(java.lang.Number defaultValue)
Sets the value used in intervals where usage data is not sent
(e.g.
|
MetricDescriptor |
setMaxValue(java.lang.Number maxValue)
Sets the maximum value, for shaping Y axis in charts, or gauges (e.g.
|
MetricDescriptor |
setMinValue(java.lang.Number minValue)
Sets the minimum value, for shaping Y axis in charts, or gauges (e.g.
|
MetricDescriptor |
setName(java.lang.String name)
Sets the untranslated name
|
MetricDescriptor |
setRangeAggregationMethods(AggregationMethodDescriptor.RangeAggregationMethod... aggregationMethods)
Sets the aggregation type methods for an entire time range.
|
void |
setSharedDurationCap(java.lang.Number sharedDurationCap) |
MetricDescriptor |
setSliceAggregationMethods(AggregationMethodDescriptor.SliceAggregationMethod... aggregationMethods)
Sets the aggregation type methods for small time periods (for example, hours
when looking at a day).
|
MetricDescriptor |
setTranslatedUnits(java.util.Map<java.lang.String,java.lang.String> translatedUnits)
Sets the translated display units as a map where the key is the language and
the value is the translated unit of the metric (e.g.
|
MetricDescriptor |
setUnits(java.lang.String units)
Sets the untranslated units
|
getRangeAggregationMethodNames, getRangeAggregationMethods, getSliceAggregationMethodNames, getSliceAggregationMethods
public MetricDescriptor(java.lang.String type, java.util.Map<java.lang.String,java.lang.String> translatedNames)
MetricDescriptor
with all required descriptor attributes.
Optional attributes should be provided by calling set methods.
A MetricDescriptor must provide the following attributes:
type
- unique identifier for the metrictranslatedNames
- translated display names for the metricpublic java.lang.String getType()
Metric.getMetricType()
.public java.util.Map<java.lang.String,java.lang.String> getTranslatedNames()
public java.util.Map<java.lang.String,java.lang.String> getTranslatedUnits()
Default : null (no units displayed)
public java.lang.Number getDefaultValue()
Default : null (default value not used)
public java.lang.Number getMinValue()
Default : null (shape based on reported values)
public java.lang.Number getMaxValue()
Default : null (shape based on reported values)
public MetricDescriptor setTranslatedUnits(java.util.Map<java.lang.String,java.lang.String> translatedUnits)
Default : null (no units displayed)
public MetricDescriptor setDefaultValue(java.lang.Number defaultValue)
Default : null (default value not used)
public MetricDescriptor setMinValue(java.lang.Number minValue)
Default : null (shape based on reported values)
public MetricDescriptor setMaxValue(java.lang.Number maxValue)
Default : null (shape based on reported values)
public MetricDescriptor addGroupDescriptor(MetricGroupDescriptor... descriptors)
public java.util.Set<MetricGroupDescriptor> getGroupDescriptors()
public MetricDescriptor setSliceAggregationMethods(AggregationMethodDescriptor.SliceAggregationMethod... aggregationMethods)
Allowed values:
The value NONE cannot be combined with other values and will result in the metric not being displayed for small time periods.
setSliceAggregationMethods
in class AggregationMethodDescriptor<MetricDescriptor>
public MetricDescriptor setRangeAggregationMethods(AggregationMethodDescriptor.RangeAggregationMethod... aggregationMethods)
Allowed values:
The value NONE cannot be combined with other values and will result in the metric not being displayed for the entire time range.
setRangeAggregationMethods
in class AggregationMethodDescriptor<MetricDescriptor>
public java.lang.String getName()
Default : null
public MetricDescriptor setName(java.lang.String name)
name
- the name to setpublic java.lang.String getUnits()
Default : null
public MetricDescriptor setUnits(java.lang.String units)
units
- the units to setpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.Number getConcurrentDurationCap()
public void setConcurrentDurationCap(java.lang.Number concurrentDurationCap)
concurrentDurationCap
- the concurrentDurationCap to setpublic java.lang.Number getSharedDurationCap()
public void setSharedDurationCap(java.lang.Number sharedDurationCap)
sharedDurationCap
- the sharedDurationCap to set