private static List<MetricRegistries> getDefinedImplemantations() {
    ServiceLoader<MetricRegistries> loader = ServiceLoader.load(MetricRegistries.class);
    List<MetricRegistries> availableFactories = new ArrayList<>();
    for (MetricRegistries impl : loader) {
      availableFactories.add(impl);
    }
    return availableFactories;
  }
Creates a {@link MetricRegistries} instance using the corresponding {@link MetricRegistries}
available to {@link ServiceLoader} on the classpath. If no instance is found, then default
implementation will be loaded.
@return A {@link MetricRegistries} implementation.
hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricRegistriesLoader.java