class ClientUtils {

    static List<InetAddress> resolve(String host, ClientDnsLookup clientDnsLookup) throws UnknownHostException {
        InetAddress[] addresses = InetAddress.getAllByName(host);

        switch (clientDnsLookup) {
            case DEFAULT:
                return Collections.singletonList(addresses[0]);
            case USE_ALL_DNS_IPS:
            case RESOLVE_CANONICAL_BOOTSTRAP_SERVERS_ONLY:
                return filterPreferredAddresses(addresses);
        }

        throw new IllegalStateException("Unhandled ClientDnsLookup instance: " + clientDnsLookup);
    }

    private  ClientUtils();

}