private ResourceInstance allocateResourceInstance(ResourceType type, Statistics s) {
    if (logger.isTraceEnabled(LogMarker.STATISTICS_VERBOSE)) {
      logger.trace(LogMarker.STATISTICS_VERBOSE,
          "SampleCollector#allocateResourceInstance type={}, s={}", type, s);
    }
    ResourceInstance resourceInstance = new ResourceInstance(resourceInstId, s, type);
    resourceInstMap.put(s, resourceInstance);
    resourceInstId++;
    return resourceInstance;
  }
Detect and archive any new resource additions or deletions
geode-core/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java