Package org.elasticsearch.client
Class Node
- java.lang.Object
-
- org.elasticsearch.client.Node
-
public class Node extends java.lang.Object
Metadata about anHttpHost
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()
Thenode.name
of the node.Node.Roles
getRoles()
Roles that the Elasticsearch process on the host has ornull
if we don't know what roles the node has.java.lang.String
getVersion()
Version of Elasticsearch that the node is running ornull
if we don't know the version.int
hashCode()
java.lang.String
toString()
-
-
-
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 excepthost
are nullable and implementations ofNodeSelector
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()
Thenode.name
of the node.
-
getVersion
public java.lang.String getVersion()
Version of Elasticsearch that the node is running ornull
if we don't know the version.
-
getRoles
public Node.Roles getRoles()
Roles that the Elasticsearch process on the host has ornull
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-