void buildReverseMapsFromRegion() {
    int totalPdxTypeIdInDS = 0;
    int totalEnumIdInDS = 0;
    TXStateProxy currentState = suspendTX();
    try {
      reverseMap.clear();
      for (Map.Entry<Object, Object> entry : getIdToType().entrySet()) {
        Object k = entry.getKey();
        Object v = entry.getValue();
        if (k instanceof EnumId) {
          EnumId id = (EnumId) k;
          int tmpDsId = PLACE_HOLDER_FOR_DS_ID & id.intValue();
          if (tmpDsId == typeIdPrefix) {
            totalEnumIdInDS++;
            if (totalEnumIdInDS >= MAX_TYPE_ID) {
              throw new InternalGemFireError(
                  "Used up all of the PDX enum ids for this distributed system. The maximum number of PDX types is "
                      + MAX_TYPE_ID);
            }
          }
        } else {
          Integer id = (Integer) k;
          int tmpDsId = PLACE_HOLDER_FOR_DS_ID & id;
          if (tmpDsId == typeIdPrefix) {
            totalPdxTypeIdInDS++;
            if (totalPdxTypeIdInDS >= MAX_TYPE_ID) {
              throw new InternalGemFireError(
                  "Used up all of the PDX type ids for this distributed system. The maximum number of PDX types is "
                      + MAX_TYPE_ID);
            }
          }
        }
        reverseMap.save(k, v);
      }
    } finally {
      resumeTX(currentState);
    }
  }
Should only be called holding the dlock
This method iterates through the entire PdxTypes region and syncs the reverse map with the pdx
region This is an expensive operation and should only be called during initialization. A cache
listener is used to keep the reverse maps up to date.
geode-core/src/main/java/org/apache/geode/pdx/internal/PeerTypeRegistration.java