public static <T> ConnectionSpec create(List<T> servers,
                                            Function<T, String> hostnameGetter,
                                            Function<T, Integer> portGetter,
                                            boolean localhostAffinity) {
        String localSpec = createSpec(servers, hostnameGetter, portGetter, localhostAffinity);
        String ensembleSpec = localhostAffinity ? createSpec(servers, hostnameGetter, portGetter, false) : localSpec;
        return new ConnectionSpec(localSpec, ensembleSpec, servers.size());
    }
Returns the number of servers in the ensemble
zkfacade/src/main/java/com/yahoo/vespa/curator/ConnectionSpec.java