Package org.elasticsearch.client
Class Node
- java.lang.Object
-
- org.elasticsearch.client.Node
-
public class Node extends java.lang.ObjectMetadata about anHttpHostrunning Elasticsearch.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNode.RolesRole 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 booleanequals(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.HttpHostgetHost()Contact information for the host.java.lang.StringgetName()Thenode.nameof the node.Node.RolesgetRoles()Roles that the Elasticsearch process on the host has ornullif we don't know what roles the node has.java.lang.StringgetVersion()Version of Elasticsearch that the node is running ornullif we don't know the version.inthashCode()java.lang.StringtoString()
-
-
-
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 excepthostare nullable and implementations ofNodeSelectorneed 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()
Thenode.nameof the node.
-
getVersion
public java.lang.String getVersion()
Version of Elasticsearch that the node is running ornullif we don't know the version.
-
getRoles
public Node.Roles getRoles()
Roles that the Elasticsearch process on the host has ornullif 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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-