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 java.util.Map<KeyType,MetricDatum> |
data |
| Constructor and Description |
|---|
AccumulatingMetricsScope() |
| Modifier and Type | Method and Description |
|---|---|
void |
addData(KeyType key,
java.lang.String name,
double value,
StandardUnit unit)
Adds data points to an IMetricsScope.
|
void |
addData(java.lang.String name,
double value,
StandardUnit unit)
Adds a data point to this IMetricsScope.
|
protected abstract KeyType |
getKey(java.lang.String name) |
addDimension, endgetDimensionsprotected java.util.Map<KeyType,MetricDatum> data
public void addData(java.lang.String name,
double value,
StandardUnit unit)
IMetricsScopeaddData in interface IMetricsScopeaddData in class EndingMetricsScopename - data point namevalue - data point valueunit - unit of data pointprotected abstract KeyType getKey(java.lang.String name)
name - key name for a metricpublic void addData(KeyType key, java.lang.String name, double value, StandardUnit unit)
key - data point keyname - data point namevalue - data point valueunit - data point unit