@Override
  public synchronized MetricsHeapMemoryManagerSource getHeapMemoryManager() {
    synchronized (FactoryStorage.INSTANCE.aggLock) {
      if (FactoryStorage.INSTANCE.heapMemMngImpl == null) {
        FactoryStorage.INSTANCE.heapMemMngImpl = new MetricsHeapMemoryManagerSourceImpl();
      }
      return FactoryStorage.INSTANCE.heapMemMngImpl;
    }
  }
Factory to create MetricsRegionServerSource when given a MetricsRegionServerWrapper
hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSourceFactoryImpl.java