Interface MetricRegistry

    • Method Detail

      • register

        void register​(String name,
                      IntSupplier supplier,
                      @Nullable
                      @Nullable String desc)
        Registers an int metric which value will be queried from the specified supplier.
        Parameters:
        name - Metric short name. Doesn't include registry name.
        supplier - Metric value supplier.
        desc - Metric description.
      • register

        void register​(String name,
                      LongSupplier supplier,
                      @Nullable
                      @Nullable String desc)
        Registers a long metric which value will be queried from the specified supplier.
        Parameters:
        name - Metric short name. Doesn't include registry name.
        supplier - Metric value supplier.
        desc - Metric description.
      • register

        void register​(String name,
                      DoubleSupplier supplier,
                      @Nullable
                      @Nullable String desc)
        Registers a double metric which value will be queried from the specified supplier.
        Parameters:
        name - Metric short name. Doesn't include the registry name.
        supplier - Metric value supplier.
        desc - Metric description.
      • register

        <T> void register​(String name,
                          Supplier<T> supplier,
                          Class<T> type,
                          @Nullable
                          @Nullable String desc)
        Registers an object metric which value will be queried from the specified supplier.
        Type Parameters:
        T - Metric value type.
        Parameters:
        name - Metric short name. Doesn't include registry name.
        supplier - Metric value supplier.
        type - Metric value type.
        desc - Metric description.
      • register

        void register​(String name,
                      BooleanSupplier supplier,
                      @Nullable
                      @Nullable String desc)
        Registers a boolean metric which value will be queried from the specified supplier.
        Parameters:
        name - Metric short name. Doesn't include registry name.
        supplier - Metric value supplier.
        desc - Metric description.
      • remove

        void remove​(String name)
        Removes metrics with the name.
        Parameters:
        name - Metric short name. Doesn't include registry name.