Package org.elasticsearch.discovery.zen
Class ZenPing.PingCollection
java.lang.Object
org.elasticsearch.discovery.zen.ZenPing.PingCollection
- Enclosing interface:
- ZenPing
a utility collection of pings where only the most recent ping is stored per node
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPing(ZenPing.PingResponse ping)adds a ping if newer than previous pings from the same nodeintsize()the number of nodes for which there are known pingstoList()serialize current pings to a list.
-
Constructor Details
-
PingCollection
public PingCollection()
-
-
Method Details
-
addPing
adds a ping if newer than previous pings from the same node- Returns:
- true if added, false o.w.
-
toList
serialize current pings to a list. It is guaranteed that the list contains one ping response per node -
size
public int size()the number of nodes for which there are known pings
-