Package org.elasticsearch.client
Class PreferHasAttributeNodeSelector
java.lang.Object
org.elasticsearch.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 Node
s even if there is no Node
with particular attribute in the attributes.-
Field Summary
Fields inherited from interface org.elasticsearch.client.NodeSelector
ANY, SKIP_DEDICATED_MASTERS
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
PreferHasAttributeNodeSelector
-
-
Method Details
-
select
Description copied from interface:NodeSelector
Select theNode
s to which to send requests. This is called with a mutableIterable
of Nodes in the order that the rest client would prefer to use them and implementers should remove nodes from the that should not receive the request. Implementers may iterate the nodes as many times as they need.This may be called twice per request: first for "living" nodes that have not been blacklisted by previous errors. If the selector removes all nodes from the list or if there aren't any living nodes then the
RestClient
will call this method with a list of "dead" nodes.Implementers should not rely on the ordering of the nodes.
- Specified by:
select
in interfaceNodeSelector
-
equals
-
hashCode
public int hashCode() -
toString
-