Package io.opencensus.implcore.stats
Class MeasureMapImpl
- java.lang.Object
-
- io.opencensus.stats.MeasureMap
-
- io.opencensus.implcore.stats.MeasureMapImpl
-
final class MeasureMapImpl extends MeasureMap
Implementation ofMeasureMap.
-
-
Field Summary
Fields Modifier and Type Field Description private MeasureMapInternal.Builderbuilderprivate booleanhasUnsupportedValuesprivate static java.util.logging.Loggerloggerprivate StatsManagerstatsManager
-
Constructor Summary
Constructors Modifier Constructor Description privateMeasureMapImpl(StatsManager statsManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static MeasureMapImplcreate(StatsManager statsManager)MeasureMapImplput(Measure.MeasureDouble measure, double value)Associates theMeasure.MeasureDoublewith the given value.MeasureMapImplput(Measure.MeasureLong measure, long value)Associates theMeasure.MeasureLongwith the given value.MeasureMapputAttachment(java.lang.String key, AttachmentValue value)Associate the contextual information of anExemplarto thisMeasureMap.voidrecord()Records all of the measures at the same time, with the currentTagContext.voidrecord(TagContext tags)Records all of the measures at the same time, with an explicitTagContext.-
Methods inherited from class io.opencensus.stats.MeasureMap
putAttachment
-
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
statsManager
private final StatsManager statsManager
-
builder
private final MeasureMapInternal.Builder builder
-
hasUnsupportedValues
private volatile boolean hasUnsupportedValues
-
-
Constructor Detail
-
MeasureMapImpl
private MeasureMapImpl(StatsManager statsManager)
-
-
Method Detail
-
create
static MeasureMapImpl create(StatsManager statsManager)
-
put
public MeasureMapImpl put(Measure.MeasureDouble measure, double value)
Description copied from class:MeasureMapAssociates theMeasure.MeasureDoublewith the given value. Subsequent updates to the sameMeasure.MeasureDoublewill overwrite the previous value.- Specified by:
putin classMeasureMap- Parameters:
measure- theMeasure.MeasureDoublevalue- the value to be associated withmeasure- Returns:
- this
-
put
public MeasureMapImpl put(Measure.MeasureLong measure, long value)
Description copied from class:MeasureMapAssociates theMeasure.MeasureLongwith the given value. Subsequent updates to the sameMeasure.MeasureLongwill overwrite the previous value.- Specified by:
putin classMeasureMap- Parameters:
measure- theMeasure.MeasureLongvalue- the value to be associated withmeasure- Returns:
- this
-
putAttachment
public MeasureMap putAttachment(java.lang.String key, AttachmentValue value)
Description copied from class:MeasureMapAssociate the contextual information of anExemplarto thisMeasureMap. Contextual information is represented as aStringkey and anAttachmentValue.If this method is called multiple times with the same key, only the last value will be kept.
- Overrides:
putAttachmentin classMeasureMap- Parameters:
key- the key of contextual information of anExemplar.value- the value of contextual information of anExemplar.- Returns:
- this
-
record
public void record()
Description copied from class:MeasureMapRecords all of the measures at the same time, with the currentTagContext.This method records all of the stats in the
MeasureMapevery time it is called.- Specified by:
recordin classMeasureMap
-
record
public void record(TagContext tags)
Description copied from class:MeasureMapRecords all of the measures at the same time, with an explicitTagContext.This method records all of the stats in the
MeasureMapevery time it is called.- Specified by:
recordin classMeasureMap- Parameters:
tags- the tags associated with the measurements.
-
-