Class DoubleCumulativeImpl
java.lang.Object
io.opencensus.metrics.DoubleCumulative
io.opencensus.implcore.metrics.DoubleCumulativeImpl
Implementation of
DoubleCumulative.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classImplementation ofDoubleCumulative.DoublePoint.Nested classes/interfaces inherited from class DoubleCumulative
DoubleCumulative.DoublePoint -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes allTimeSeriesfrom the cumulative metric. i.e. references to all previousDoublePointobjects are invalid (not part of the metric).Returns aDoublePointfor a cumulative with all labels not set, or default labels.getOrCreateTimeSeries(List<LabelValue> labelValues) Creates aTimeSeriesand returns aDoublePointif the specifiedlabelValuesis not already associated with this cumulative, else returns an existingDoublePoint.voidremoveTimeSeries(List<LabelValue> labelValues) Removes theTimeSeriesfrom the cumulative metric, if it is present. i.e. references to previousDoublePointobjects are invalid (not part of the metric).
-
Method Details
-
getOrCreateTimeSeries
Description copied from class:DoubleCumulativeCreates aTimeSeriesand returns aDoublePointif the specifiedlabelValuesis not already associated with this cumulative, else returns an existingDoublePoint.It is recommended to keep a reference to the DoublePoint instead of always calling this method for manual operations.
- Specified by:
getOrCreateTimeSeriesin classDoubleCumulative- Parameters:
labelValues- the list of label values. The number of label values must be the same to that of the label keys passed toMetricRegistry.addDoubleCumulative(String, MetricOptions).- Returns:
- a
DoublePointthe value of single cumulative.
-
getDefaultTimeSeries
Description copied from class:DoubleCumulativeReturns aDoublePointfor a cumulative with all labels not set, or default labels.- Specified by:
getDefaultTimeSeriesin classDoubleCumulative- Returns:
- a
DoublePointfor a cumulative with all labels not set, or default labels.
-
removeTimeSeries
Description copied from class:DoubleCumulativeRemoves theTimeSeriesfrom the cumulative metric, if it is present. i.e. references to previousDoublePointobjects are invalid (not part of the metric).- Specified by:
removeTimeSeriesin classDoubleCumulative- Parameters:
labelValues- the list of label values.
-
clear
public void clear()Description copied from class:DoubleCumulativeRemoves allTimeSeriesfrom the cumulative metric. i.e. references to all previousDoublePointobjects are invalid (not part of the metric).- Specified by:
clearin classDoubleCumulative
-
getMetricDescriptor
-
getMetric
-