public void validateCreate(AbstractConfiguration config, CacheConfigurationManager manager) {

    Map<String, AbstractConfiguration> existingElementsAndTheirGroups =
        findCacheElement(config, manager);
    if (existingElementsAndTheirGroups.size() == 0) {
      return;
    }

    // if the configuration is not groupable and already exists, throw exception
    if (!(config instanceof GroupableConfiguration)) {
      throw new EntityExistsException(
          config.getClass().getSimpleName() + " '" + config.getId()
              + "' already exists");
    }

    // if configuration is groupable, then check if it's already in the group
    String configGroup = AbstractConfiguration.getGroupName(config.getGroup());
    if (existingElementsAndTheirGroups.containsKey(configGroup)) {
      throw new EntityExistsException(
          config.getClass().getSimpleName() + " '" + config.getId()
              + "' already exists in group " + configGroup);
    }

    // if other group and this new group has common members, then throw exception
    String[] groups = existingElementsAndTheirGroups.keySet().toArray(new String[0]);
    Set<DistributedMember> membersOfExistingGroups = findServers(groups);
    Set<DistributedMember> membersOfNewGroup = findServers(config.getGroup());
    Set<DistributedMember> intersection = new HashSet<>(membersOfExistingGroups);
    intersection.retainAll(membersOfNewGroup);
    if (intersection.size() > 0) {
      String members =
          intersection.stream().map(DistributedMember::getName).collect(Collectors.joining(", "));
      throw new EntityExistsException(
          config.getClass().getSimpleName() + " '" + config.getId()
              + "' already exists on member(s) " + members + ".");
    }

    // if there is no common member, we still need to verify if the new config is compatible with
    // the existing ones.
    for (Map.Entry<String, AbstractConfiguration> existing : existingElementsAndTheirGroups
        .entrySet()) {
      manager.checkCompatibility(config, existing.getKey(), existing.getValue());
    }
  }
this is used to validate all the common attributes of CacheElement, eg. name and group
geode-core/src/main/java/org/apache/geode/management/internal/configuration/validators/MemberValidator.java