protected Set<BucketServerLocation66> getBucketServerLocations(int version) {
    InternalCache cache = getProxyBucketRegion().getCache();
    List<CacheServer> servers = cache.getCacheServers();
    if (servers.isEmpty()) {
      return Collections.emptySet();
    }
    HashSet<BucketServerLocation66> serverLocations = new HashSet<>();
    for (CacheServer cacheServer : servers) {
      CacheServerImpl server = (CacheServerImpl) cacheServer;
      try {
        String serverExternalAddress;
        if (server.isRunning() && ((serverExternalAddress = server.getExternalAddress()) != null)) {
          BucketServerLocation66 location = new BucketServerLocation66(getBucket().getId(),
              server.getPort(), serverExternalAddress, getBucket().isPrimary(),
              Integer.valueOf(version).byteValue(), server.getCombinedGroups());
          serverLocations.add(location);
        }
      } catch (IllegalStateException e) {
        if (!(e.getMessage() != null
            && e.getMessage().equals(CACHE_SERVER_BIND_ADDRESS_NOT_AVAILABLE_EXCEPTION_MESSAGE))) {
          throw e;
        }
      }
    }
    return serverLocations;
  }
Returns true if the a primary is known.
geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java