/** * Returns a new {@link RestClientBuilder} to help with {@link RestClient} creation. */ public static RestClientBuilder builder(HttpHost... hosts) { return new RestClientBuilder(hosts); }
/** * Returns a new {@link RestClientBuilder} to help with {@link RestClient} creation. * Creates a new builder instance and sets the hosts that the client will send requests to. */ public static RestClientBuilder builder(HttpHost... hosts) { return new RestClientBuilder(hosts); }
/** * Returns a new {@link RestClientBuilder} to help with {@link RestClient} creation. * Creates a new builder instance and sets the hosts that the client will send requests to. * <p> * Prefer this to {@link #builder(HttpHost...)} if you have metadata up front about the nodes. * If you don't either one is fine. */ public static RestClientBuilder builder(Node... nodes) { return new RestClientBuilder(nodes == null ? null : Arrays.asList(nodes)); }
/** * Returns a new {@link RestClientBuilder} to help with {@link RestClient} creation. * Creates a new builder instance and sets the nodes that the client will send requests to. * <p> * You can use this if you do not have metadata up front about the nodes. If you do, prefer * {@link #builder(Node...)}. * @see Node#Node(HttpHost) */ public static RestClientBuilder builder(HttpHost... hosts) { return new RestClientBuilder(hostsToNodes(hosts)); }