@Override
  public PoolFactory addServer(String host, int port) {
    if (attributes.locators.size() > 0) {
      throw new IllegalStateException(
          "A locator has already been added. You can only add locators or servers; not both.");
    }
    validatePort(port);
    attributes.servers.add(new HostAndPort(host, port));
    return this;
  }
The cache that created this factory
geode-core/src/main/java/org/apache/geode/internal/cache/PoolFactoryImpl.java