Class LongGaugeImpl

    • 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
    • Constructor Detail

      • LongGaugeImpl

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

      • getDefaultTimeSeries

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

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

        public void clear()
        Description copied from class: LongGauge
        Removes all TimeSeries from the gauge metric. i.e. references to all previous LongPoint objects are invalid (not part of the metric).
        Specified by:
        clear in class LongGauge
      • 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.