Class HasAttributeNodeSelector

java.lang.Object
org.opensearch.client.HasAttributeNodeSelector
All Implemented Interfaces:
NodeSelector

public final class HasAttributeNodeSelector extends Object implements NodeSelector
A NodeSelector that selects nodes that have a particular value for an attribute.
  • Constructor Details

    • HasAttributeNodeSelector

      public HasAttributeNodeSelector(String key, String value)
      Create a {link HasAttributeNodeSelector} instance using the provided attribute key value pair.
      Parameters:
      key - The attribute name.
      value - The attribute value.
  • Method Details

    • select

      public void select(Iterable<Node> nodes)
      Select the Nodes to which to send requests.
      Specified by:
      select in interface NodeSelector
      Parameters:
      nodes - the Nodes targeted for the sending requests
    • equals

      public boolean equals(Object o)
      Compare two node selectors for equality
      Overrides:
      equals in class Object
      Parameters:
      o - node selector instance to compare with
    • hashCode

      public int hashCode()
      Calculate the hash code of the node selector
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Convert this node selector to string representation
      Overrides:
      toString in class Object