Class TransportHttpClient.Node

java.lang.Object
co.elastic.clients.transport.http.TransportHttpClient.Node
Enclosing interface:
TransportHttpClient

public static class TransportHttpClient.Node extends Object
A node/host to send requests to.
  • Constructor Details

    • Node

      public Node(URI uri, Set<String> roles, Map<String,String> attributes)
      Create a node with its URI, roles and attributes.

      If the URI doesn't end with a '/', then one is added.

      Parameters:
      uri - the node's URI
      roles - the node's roles (such as "master", "ingest", etc). This can be used for routing decisions by multi-node implementations.
      attributes - the node's attributes. This can be used for routing decisions by multi-node implementations.
    • Node

      public Node(URI uri)
    • Node

      public Node(String uri)
  • Method Details

    • uri

      public URI uri()
      The URI of this node. This is an absolute URL with a path ending with a "/".
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Two nodes are considered equal if their URIs are equal. Roles and attributes are ignored.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      A node's hash code is that of its URI. Roles and attributes are ignored.
      Overrides:
      hashCode in class Object