Package org.elasticsearch.cluster
Interface ClusterInfoService
- All Known Implementing Classes:
EmptyClusterInfoService
,InternalClusterInfoService
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface ClusterInfoService
Interface for a class used to gather information about a cluster periodically.
-
Method Summary
Modifier and Type Method Description default void
addListener(java.util.function.Consumer<ClusterInfo> clusterInfoConsumer)
Add a listener for new cluster informationClusterInfo
getClusterInfo()
-
Method Details
-
getClusterInfo
ClusterInfo getClusterInfo()- Returns:
- the latest cluster information
-
addListener
Add a listener for new cluster information
-