Examples of transportAddresses()


Examples of org.elasticsearch.client.transport.TransportClient.transportAddresses()

  public void test_transport_client() {
    Client client = checkClient();
        assertThat(client, instanceOf(org.elasticsearch.client.transport.TransportClient.class));

        TransportClient tClient = (TransportClient) client;
        ImmutableList<TransportAddress> adresses = tClient.transportAddresses();
        assertThat(adresses, not(emptyCollectionOf(TransportAddress.class)));
        assertThat(adresses.size(), is(2));
  }
}
View Full Code Here

Examples of org.elasticsearch.client.transport.TransportClient.transportAddresses()

  public void test_transport_client_namespace() {
    Client client = checkClient("testTransportClient");
        assertThat(client, instanceOf(org.elasticsearch.client.transport.TransportClient.class));

    TransportClient tClient = (TransportClient) client;
    ImmutableList<TransportAddress> adresses = tClient.transportAddresses();
        assertThat("Nodes urls must not be empty...", adresses, not(emptyCollectionOf(TransportAddress.class)));

    // Testing if we are really connected to a cluster node
        assertThat("We should be connected at least to one node.", tClient.connectedNodes(), not(emptyCollectionOf(DiscoveryNode.class)));
View Full Code Here

Examples of org.elasticsearch.client.transport.TransportClient.transportAddresses()


    private void closeClient() {
        if (transportClient != null) {
            TransportClient tc = ((TransportClient) transportClient);
            for (TransportAddress address : tc.transportAddresses()) {
                tc.removeTransportAddress(address);
            }
            transportClient.close();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.