Class Node


  • public class Node
    extends java.lang.Object
    Metadata about an HttpHost running Elasticsearch.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Node.Roles
      Role information about an Elasticsearch process.
    • Constructor Summary

      Constructors 
      Constructor Description
      Node​(org.apache.http.HttpHost host)
      Create a Node without any metadata.
      Node​(org.apache.http.HttpHost host, java.util.Set<org.apache.http.HttpHost> boundHosts, java.lang.String name, java.lang.String version, Node.Roles roles, java.util.Map<java.lang.String,java.util.List<java.lang.String>> attributes)
      Create a Node with metadata.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAttributes()
      Attributes declared on the node.
      java.util.Set<org.apache.http.HttpHost> getBoundHosts()
      Addresses on which the host is listening.
      org.apache.http.HttpHost getHost()
      Contact information for the host.
      java.lang.String getName()
      The node.name of the node.
      Node.Roles getRoles()
      Roles that the Elasticsearch process on the host has or null if we don't know what roles the node has.
      java.lang.String getVersion()
      Version of Elasticsearch that the node is running or null if we don't know the version.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Node

        public Node​(org.apache.http.HttpHost host,
                    java.util.Set<org.apache.http.HttpHost> boundHosts,
                    java.lang.String name,
                    java.lang.String version,
                    Node.Roles roles,
                    java.util.Map<java.lang.String,java.util.List<java.lang.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 Detail

      • getHost

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

        public java.util.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 java.lang.String getName()
        The node.name of the node.
      • getVersion

        public java.lang.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 java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAttributes()
        Attributes declared on the node.
      • toString

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object