@NotThreadSafe public abstract class MeasureMap extends Object
Measures to measured values to be recorded at the same time.| Constructor and Description |
|---|
MeasureMap() |
| Modifier and Type | Method and Description |
|---|---|
abstract MeasureMap |
put(Measure.MeasureDouble measure,
double value)
Associates the
Measure.MeasureDouble with the given value. |
abstract MeasureMap |
put(Measure.MeasureLong measure,
long value)
Associates the
Measure.MeasureLong with the given value. |
MeasureMap |
putAttachment(String key,
String value)
Associate the contextual information of an
Exemplar to this MeasureMap. |
abstract void |
record()
Records all of the measures at the same time, with the current
TagContext. |
abstract void |
record(TagContext tags)
Records all of the measures at the same time, with an explicit
TagContext. |
public abstract MeasureMap put(Measure.MeasureDouble measure, double value)
Measure.MeasureDouble with the given value. Subsequent updates to the same
Measure.MeasureDouble will overwrite the previous value.measure - the Measure.MeasureDoublevalue - the value to be associated with measurepublic abstract MeasureMap put(Measure.MeasureLong measure, long value)
Measure.MeasureLong with the given value. Subsequent updates to the same Measure.MeasureLong will overwrite the previous value.measure - the Measure.MeasureLongvalue - the value to be associated with measurepublic MeasureMap putAttachment(String key, String value)
Exemplar to this MeasureMap.
Contextual information is represented as String key-value pairs.
If this method is called multiple times with the same key, only the last value will be kept.
key - the key of contextual information of an Exemplar.value - the string representation of contextual information of an Exemplar.public abstract void record()
TagContext.
This method records all of the stats in the MeasureMap every time it is called.
public abstract void record(TagContext tags)
TagContext.
This method records all of the stats in the MeasureMap every time it is called.
tags - the tags associated with the measurements.