KeyType - can be a class or object defined by the user that stores information about a MetricDatum needed
by the user.
The following is a example of what a KeyType class might look like:
class SampleKeyType {
private long timeKeyCreated;
private MetricDatum datum;
public SampleKeyType(long timeKeyCreated, MetricDatum datum){
this.timeKeyCreated = timeKeyCreated;
this.datum = datum;
}
}public abstract class AccumulatingMetricsScope<KeyType> extends EndingMetricsScope
| Modifier and Type | Field and Description |
|---|---|
protected Map<KeyType,com.amazonaws.services.cloudwatch.model.MetricDatum> |
data |
METRICS_DIMENSIONS_ALL| Constructor and Description |
|---|
AccumulatingMetricsScope() |
| Modifier and Type | Method and Description |
|---|---|
void |
addData(KeyType key,
String name,
double value,
com.amazonaws.services.cloudwatch.model.StandardUnit unit)
Adds data points to an IMetricsScope.
|
void |
addData(String name,
double value,
com.amazonaws.services.cloudwatch.model.StandardUnit unit)
Adds a data point to this IMetricsScope.
|
void |
addData(String name,
double value,
com.amazonaws.services.cloudwatch.model.StandardUnit unit,
MetricsLevel level)
Adds a data point to this IMetricsScope if given metrics level is enabled.
|
protected abstract KeyType |
getKey(String name) |
addDimension, endgetDimensionspublic void addData(String name, double value, com.amazonaws.services.cloudwatch.model.StandardUnit unit)
IMetricsScopeaddData in interface IMetricsScopeaddData in class EndingMetricsScopename - data point namevalue - data point valueunit - unit of data pointpublic void addData(String name, double value, com.amazonaws.services.cloudwatch.model.StandardUnit unit, MetricsLevel level)
IMetricsScopeaddData in interface IMetricsScopeaddData in class EndingMetricsScopename - data point namevalue - data point valueunit - unit of data pointlevel - metrics level of this data pointprotected abstract KeyType getKey(String name)
name - key name for a metricpublic void addData(KeyType key, String name, double value, com.amazonaws.services.cloudwatch.model.StandardUnit unit)
key - data point keyname - data point namevalue - data point valueunit - data point unitCopyright © 2023. All rights reserved.