Class LongCumulativeImpl

java.lang.Object
io.opencensus.metrics.LongCumulative
io.opencensus.implcore.metrics.LongCumulativeImpl

public final class LongCumulativeImpl extends LongCumulative
Implementation of LongCumulative.
  • Method Details

    • getOrCreateTimeSeries

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

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

      Specified by:
      getOrCreateTimeSeries in class LongCumulative
      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.addLongCumulative(String, MetricOptions).
      Returns:
      a LongPoint the value of single cumulative.
    • getDefaultTimeSeries

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

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

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

      public MetricDescriptor getMetricDescriptor()
    • getMetric

      @Nullable public Metric getMetric(Clock clock)