private void validatePartitionListeners(final PartitionRegionConfig prconf,
      final PartitionAttributes userPA) {

    ArrayList<String> prconfList = prconf.getPartitionListenerClassNames();

    if (userPA.getPartitionListeners() == null && userPA.getPartitionListeners().length == 0
        && prconfList != null) {
      throw new IllegalStateException(
          String.format(
              "The PartitionListeners=%s are incompatible with the PartitionListeners=%s used by other distributed members.",
              null, prconfList));
    }
    if (userPA.getPartitionListeners() != null && prconfList != null) {
      ArrayList<String> userPRList = new ArrayList<>();
      for (int i = 0; i < userPA.getPartitionListeners().length; i++) {
        userPRList.add(userPA.getPartitionListeners()[i].getClass().getName());
      }

      if (userPA.getPartitionListeners().length != prconfList.size()) {
        throw new IllegalStateException(
            String.format(
                "The PartitionListeners=%s are incompatible with the PartitionListeners=%s used by other distributed members.",
                userPRList, prconfList));
      }

      for (String listener : prconfList) {
        if (!(userPRList.contains(listener))) {
          throw new IllegalStateException(
              String.format(
                  "The PartitionListeners=%s are incompatible with the PartitionListeners=%s used by other distributed members.",
                  userPRList, prconfList));
        }
      }
    }
  }
This method validates the PartitionedAttributes that user provided PR Attributes with PR
Attributes set in PR Config obtained from global meta-data allPartitionedRegion region
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionRegionConfigValidator.java