private void addSubregionSerialNumbers(Map map) {
    // iterate over all subregions to gather serialNumbers and recurse
    for (Object entryObject : subregions.entrySet()) {
      Map.Entry entry = (Map.Entry) entryObject;
      LocalRegion subregion = (LocalRegion) entry.getValue();
      map.put(subregion.getFullPath(), subregion.getSerialNumber());

      // recursively call down into each subregion tree
      subregion.addSubregionSerialNumbers(map);
    }
  }
Iterates over all subregions to put the full path and serial number into the provided map.

@param map the map to put the full path and serial number into for each subregion
geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java