@Override
    public List<InetSocketAddress> getLocators() {
      if (locators.size() == 0 && servers.size() == 0) {
        throw new IllegalStateException(
            "At least one locator or server must be added before a connection pool can be created.");
      }
      return locators.stream().map(x -> x.getSocketInetAddress()).collect(Collectors.toList());
    }
True if the pool is used by a Gateway.
geode-core/src/main/java/org/apache/geode/internal/cache/PoolFactoryImpl.java