Class Node

java.lang.Object
org.elasticsearch.client.Node

public class Node extends Object
Metadata about an HttpHost running Elasticsearch.
  • Constructor Details

    • Node

      public Node(org.apache.http.HttpHost host, Set<org.apache.http.HttpHost> boundHosts, String name, String version, Node.Roles roles, Map<String,​List<String>> attributes)
      Create a Node with metadata. All parameters except host are nullable and implementations of NodeSelector need to decide what to do in their absence.
    • Node

      public Node(org.apache.http.HttpHost host)
      Create a Node without any metadata.
  • Method Details

    • getHost

      public org.apache.http.HttpHost getHost()
      Contact information for the host.
    • getBoundHosts

      public Set<org.apache.http.HttpHost> getBoundHosts()
      Addresses on which the host is listening. These are useful to have around because they allow you to find a host based on any address it is listening on.
    • getName

      public String getName()
      The node.name of the node.
    • getVersion

      public String getVersion()
      Version of Elasticsearch that the node is running or null if we don't know the version.
    • getRoles

      public Node.Roles getRoles()
      Roles that the Elasticsearch process on the host has or null if we don't know what roles the node has.
    • getAttributes

      public Map<String,​List<String>> getAttributes()
      Attributes declared on the node.
    • toString

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object