Class Node
java.lang.Object
org.opensearch.client.transport.httpclient5.internal.Node
Metadata about an
HttpHost running OpenSearch.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRole information about an OpenSearch process. -
Constructor Summary
ConstructorsConstructorDescriptionNode(org.apache.hc.core5.http.HttpHost host) Create a Node without any metadata.Node(org.apache.hc.core5.http.HttpHost host, Set<org.apache.hc.core5.http.HttpHost> boundHosts, String name, String version, Node.Roles roles, Map<String, List<String>> attributes) Create a Node with metadata. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare two nodes for equalityAttributes declared on the node.Set<org.apache.hc.core5.http.HttpHost> Addresses on which the host is listening.org.apache.hc.core5.http.HttpHostgetHost()Contact information for the host.getName()Thenode.nameof the node.getRoles()Roles that the OpenSearch process on the host has ornullif we don't know what roles the node has.Version of OpenSearch that the node is running ornullif we don't know the version.inthashCode()Calculate the hash code of the nodetoString()Convert node to string representation
-
Constructor Details
-
Node
public Node(org.apache.hc.core5.http.HttpHost host, Set<org.apache.hc.core5.http.HttpHost> boundHosts, String name, String version, Node.Roles roles, Map<String, List<String>> attributes) Create a Node with metadata. All parameters excepthostare nullable and implementations ofNodeSelectorneed to decide what to do in their absence.- Parameters:
host- primary host addressboundHosts- addresses on which the host is listeningname- name of the nodeversion- version of OpenSearchroles- roles that the OpenSearch process has on the hostattributes- attributes declared on the node
-
Node
public Node(org.apache.hc.core5.http.HttpHost host) Create a Node without any metadata.- Parameters:
host- primary host address
-
-
Method Details
-
getHost
public org.apache.hc.core5.http.HttpHost getHost()Contact information for the host. -
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
Thenode.nameof the node. -
getVersion
Version of OpenSearch that the node is running ornullif we don't know the version. -
getRoles
Roles that the OpenSearch process on the host has ornullif we don't know what roles the node has. -
getAttributes
Attributes declared on the node. -
toString
Convert node to string representation -
equals
Compare two nodes for equality -
hashCode
public int hashCode()Calculate the hash code of the node
-