Class DoubleCumulativeImpl

java.lang.Object
io.opencensus.metrics.DoubleCumulative
io.opencensus.implcore.metrics.DoubleCumulativeImpl

public final class DoubleCumulativeImpl extends DoubleCumulative
Implementation of DoubleCumulative.
  • Method Details

    • getOrCreateTimeSeries

      public DoubleCumulative.DoublePoint getOrCreateTimeSeries(List<LabelValue> labelValues)
      Description copied from class: DoubleCumulative
      Creates a TimeSeries and returns a DoublePoint if the specified labelValues is not already associated with this cumulative, else returns an existing DoublePoint.

      It is recommended to keep a reference to the DoublePoint instead of always calling this method for manual operations.

      Specified by:
      getOrCreateTimeSeries in class DoubleCumulative
      Parameters:
      labelValues - the list of label values. The number of label values must be the same to that of the label keys passed to MetricRegistry.addDoubleCumulative(String, MetricOptions).
      Returns:
      a DoublePoint the value of single cumulative.
    • getDefaultTimeSeries

      public DoubleCumulative.DoublePoint getDefaultTimeSeries()
      Description copied from class: DoubleCumulative
      Returns a DoublePoint for a cumulative with all labels not set, or default labels.
      Specified by:
      getDefaultTimeSeries in class DoubleCumulative
      Returns:
      a DoublePoint for a cumulative with all labels not set, or default labels.
    • removeTimeSeries

      public void removeTimeSeries(List<LabelValue> labelValues)
      Description copied from class: DoubleCumulative
      Removes the TimeSeries from the cumulative metric, if it is present. i.e. references to previous DoublePoint objects are invalid (not part of the metric).
      Specified by:
      removeTimeSeries in class DoubleCumulative
      Parameters:
      labelValues - the list of label values.
    • clear

      public void clear()
      Description copied from class: DoubleCumulative
      Removes all TimeSeries from the cumulative metric. i.e. references to all previous DoublePoint objects are invalid (not part of the metric).
      Specified by:
      clear in class DoubleCumulative
    • getMetricDescriptor

      public MetricDescriptor getMetricDescriptor()
    • getMetric

      @Nullable public Metric getMetric(Clock clock)