Interface PinotGauge<T>

  • Type Parameters:
    T - the type of the metric's value
    All Superinterfaces:
    PinotMetric, SettableValue<T>

    public interface PinotGauge<T>
    extends PinotMetric, SettableValue<T>
    A gauge metric is an instantaneous reading of a particular value. To instrument a queue's depth, for example:
    
     final Queue<String> queue = new ConcurrentLinkedQueue<String>();
     final Gauge<Integer> queueDepth = new Gauge<Integer>() {
         public Integer value() {
             return queue.size();
         }
     };
     
    • Method Summary

      Modifier and Type Method Description
      Object getGauge()  
      default void setValue​(T value)
      Sets the value.
      default void setValueSupplier​(Supplier<T> valueSupplier)
      Sets the value supplier.
      T value()
      Returns the metric's current value.
    • Method Detail

      • setValue

        default void setValue​(T value)
        Description copied from interface: SettableValue
        Sets the value.
        Specified by:
        setValue in interface SettableValue<T>
        Parameters:
        value - the value to set.
      • setValueSupplier

        default void setValueSupplier​(Supplier<T> valueSupplier)
        Description copied from interface: SettableValue
        Sets the value supplier.
        Specified by:
        setValueSupplier in interface SettableValue<T>
        Parameters:
        valueSupplier - the value supplier to set.
      • value

        T value()
        Returns the metric's current value.
        Returns:
        the metric's current value