Class LongCumulativeImpl

    • Field Detail

      • UNSET_VALUE

        static final LabelValue UNSET_VALUE
      • labelKeysSize

        private final int labelKeysSize
      • defaultLabelValues

        private final java.util.List<LabelValue> defaultLabelValues
      • constantLabelValues

        private final java.util.List<LabelValue> constantLabelValues
      • startTime

        private final Timestamp startTime
    • Constructor Detail

      • LongCumulativeImpl

        LongCumulativeImpl​(java.lang.String name,
                           java.lang.String description,
                           java.lang.String unit,
                           java.util.List<LabelKey> labelKeys,
                           java.util.Map<LabelKey,​LabelValue> constantLabels,
                           Timestamp startTime)
    • Method Detail

      • removeTimeSeries

        public void removeTimeSeries​(java.util.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
      • getMetric

        @Nullable
        public Metric getMetric​(Clock clock)
        Description copied from interface: Meter
        Provides a Metric with one or more TimeSeries.
        Specified by:
        getMetric in interface Meter
        Parameters:
        clock - the clock used to get the time.
        Returns:
        a Metric.