public static Set<DistributedMember> getAllNormalMembers(InternalCache cache) {
    return new HashSet<>(
        cache.getDistributionManager().getNormalDistributionManagerIds());
  }
Returns a set of all the members of the distributed system excluding locators.
geode-core/src/main/java/org/apache/geode/management/internal/util/ManagementUtils.java