Class Node

java.lang.Object
org.opensearch.client.Node

public class Node extends Object
Metadata about an HttpHost running OpenSearch.
  • 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.
      Parameters:
      host - primary host address
      boundHosts - addresses on which the host is listening
      name - name of the node
      version - version of OpenSearch
      roles - roles that the OpenSearch process has on the host
      attributes - attributes declared on the node
    • Node

      public Node(org.apache.http.HttpHost host)
      Create a Node without any metadata.
      Parameters:
      host - primary host address
  • 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 OpenSearch that the node is running or null if we don't know the version.
    • getRoles

      public Node.Roles getRoles()
      Roles that the OpenSearch 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