Package io.opencensus.implcore.stats
Class MeasureMapInternal.Builder
- java.lang.Object
-
- io.opencensus.implcore.stats.MeasureMapInternal.Builder
-
- Enclosing class:
- MeasureMapInternal
static class MeasureMapInternal.Builder extends java.lang.Object
Builder for theMeasureMapInternal
class.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,AttachmentValue>
attachments
private java.util.ArrayList<Measurement>
measurements
-
Constructor Summary
Constructors Modifier Constructor Description private
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) MeasureMapInternal
build()
Constructs aMeasureMapInternal
from the current measurements.(package private) MeasureMapInternal.Builder
put(Measure.MeasureDouble measure, double value)
Associates theMeasure.MeasureDouble
with the given value.(package private) MeasureMapInternal.Builder
put(Measure.MeasureLong measure, long value)
Associates theMeasure.MeasureLong
with the given value.(package private) MeasureMapInternal.Builder
putAttachment(java.lang.String key, AttachmentValue value)
-
-
-
Field Detail
-
measurements
private final java.util.ArrayList<Measurement> measurements
-
attachments
private final java.util.Map<java.lang.String,AttachmentValue> attachments
-
-
Method Detail
-
put
MeasureMapInternal.Builder put(Measure.MeasureDouble measure, double value)
Associates theMeasure.MeasureDouble
with the given value. Subsequent updates to the sameMeasure.MeasureDouble
will overwrite the previous value.- Parameters:
measure
- theMeasure.MeasureDouble
value
- the value to be associated withmeasure
- Returns:
- this
-
put
MeasureMapInternal.Builder put(Measure.MeasureLong measure, long value)
Associates theMeasure.MeasureLong
with the given value. Subsequent updates to the sameMeasure.MeasureLong
will overwrite the previous value.- Parameters:
measure
- theMeasure.MeasureLong
value
- the value to be associated withmeasure
- Returns:
- this
-
putAttachment
MeasureMapInternal.Builder putAttachment(java.lang.String key, AttachmentValue value)
-
build
MeasureMapInternal build()
Constructs aMeasureMapInternal
from the current measurements.
-
-