@NotThreadSafe public abstract class MeasureMap extends Object
Measure
s 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,
AttachmentValue value)
Associate the contextual information of an
Exemplar to this MeasureMap . |
MeasureMap |
putAttachment(String key,
String value)
Deprecated.
in favor of
putAttachment(String, AttachmentValue) . |
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.MeasureDouble
value
- the value to be associated with measure
public 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.MeasureLong
value
- the value to be associated with measure
@Deprecated public MeasureMap putAttachment(String key, String value)
putAttachment(String, AttachmentValue)
.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 MeasureMap putAttachment(String key, AttachmentValue value)
Exemplar
to this MeasureMap
.
Contextual information is represented as a String
key and an AttachmentValue
.
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 value 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.