Class MetricRegistries

java.lang.Object
org.apache.hadoop.hbase.metrics.MetricRegistries
Direct Known Subclasses:
MetricRegistriesImpl

@LimitedPrivate("Coprocesssor") @Evolving public abstract class MetricRegistries extends Object
MetricRegistries is collection of MetricRegistry's. MetricsRegistries implementations should do ref-counting of MetricRegistry's via create() and remove() methods.
  • Constructor Details

  • Method Details

    • global

      public static MetricRegistries global()
      Return the global singleton instance for the MetricRegistries.
      Returns:
      MetricRegistries implementation.
    • clear

      public abstract void clear()
      Removes all the MetricRegisties.
    • create

      public abstract MetricRegistry create(MetricRegistryInfo info)
      Create or return MetricRegistry with the given info. MetricRegistry will only be created if current reference count is 0. Otherwise ref counted is incremented, and an existing instance will be returned.
      Parameters:
      info - the info object for the MetricRegistrytry.
      Returns:
      created or existing MetricRegistry.
    • remove

      public abstract boolean remove(MetricRegistryInfo key)
      Decrements the ref count of the MetricRegistry, and removes if ref count == 0.
      Parameters:
      key - the info object for the MetricRegistrytry.
      Returns:
      true if metric registry is removed.
    • get

      public abstract Optional<MetricRegistry> get(MetricRegistryInfo info)
      Returns the MetricRegistry if found.
      Parameters:
      info - the info for the registry.
      Returns:
      a MetricRegistry optional.
    • getMetricRegistryInfos

      Returns MetricRegistryInfo's for the MetricRegistry's created.
      Returns:
      MetricRegistryInfo's for the MetricRegistry's created.
    • getMetricRegistries

      Returns MetricRegistry's created.
      Returns:
      MetricRegistry's created.