@Override
  public int defineEnum(final EnumInfo newInfo) {
    statistics.enumDefined();
    verifyConfiguration();
    EnumId existingId = reverseMap.getIdFromReverseMap(newInfo);
    if (existingId != null) {
      return existingId.intValue();
    }
    lock();
    try {
      if (shouldReload()) {
        buildReverseMapsFromRegion();
      }
      reverseMap.flushPendingReverseMap();

      // double check if my Enum is in the reverse map in case it was just flushed into it
      existingId = reverseMap.getIdFromReverseMap(newInfo);
      if (existingId != null) {
        return existingId.intValue();
      }

      EnumId id = allocateEnumId(newInfo);
      updateIdToEnumRegion(id, newInfo);

      return id.intValue();
    } finally {
      // flush the reverse map for the member that introduced this new enumInfo
      reverseMap.flushPendingReverseMap();
      unlock();
    }
  }
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