Class LongGauge.NoopLongGauge

java.lang.Object
io.opencensus.metrics.LongGauge
io.opencensus.metrics.LongGauge.NoopLongGauge
Enclosing class:
LongGauge

private static final class LongGauge.NoopLongGauge extends LongGauge
No-op implementations of LongGauge class.
Since:
0.17
  • Field Details

    • labelKeysSize

      private final int labelKeysSize
  • Constructor Details

  • Method Details

    • create

      static LongGauge.NoopLongGauge create(String name, String description, String unit, List<LabelKey> labelKeys)
    • getOrCreateTimeSeries

      public LongGauge.NoopLongGauge.NoopLongPoint getOrCreateTimeSeries(List<LabelValue> labelValues)
      Description copied from class: LongGauge
      Creates a TimeSeries and returns a LongPoint if the specified labelValues is not already associated with this gauge, 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 LongGauge
      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.addLongGauge(String, String, String, List).
      Returns:
      a LongPoint the value of single gauge.
    • getDefaultTimeSeries

      public LongGauge.NoopLongGauge.NoopLongPoint 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(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