Package org.opensearch.client
Class PreferHasAttributeNodeSelector
java.lang.Object
org.opensearch.client.PreferHasAttributeNodeSelector
- All Implemented Interfaces:
NodeSelector
Both
PreferHasAttributeNodeSelector and HasAttributeNodeSelector will work the same
if there is a Node with particular attribute in the attributes,
but PreferHasAttributeNodeSelector will select another Nodes even if there is no Node
with particular attribute in the attributes.-
Field Summary
Fields inherited from interface org.opensearch.client.NodeSelector
ANY, SKIP_DEDICATED_CLUSTER_MANAGERS -
Constructor Summary
ConstructorsConstructorDescriptionPreferHasAttributeNodeSelector(String key, String value) Creates aPreferHasAttributeNodeSelectorinstance with the given key value pair. -
Method Summary
-
Constructor Details
-
PreferHasAttributeNodeSelector
Creates aPreferHasAttributeNodeSelectorinstance with the given key value pair.- Parameters:
key- attribute keyvalue- attribute value
-
-
Method Details
-
select
Select theNodes to which to send requests.- Specified by:
selectin interfaceNodeSelector- Parameters:
nodes- theNodes targeted for the sending requests
-
equals
Compare two node selectors for equality -
hashCode
public int hashCode()Calculate the hash code of the node selector -
toString
Convert this node selector to string representation
-