Package org.apache.solr.cluster
Interface Cluster
public interface Cluster
A representation of the SolrCloud cluster state, providing information on which nodes and
collections are part of the cluster and a way to get to more detailed info.
-
Method Summary
Modifier and TypeMethodDescriptionAllow foreach iteration on all collections of the cluster, such as:for (SolrCollection c : cluster.collections()) {...}.getCollection(String collectionName) Returns info about the given collection if one exists.iterator()
-
Method Details
-
getLiveNodes
- Returns:
- current set of live nodes.
-
getLiveDataNodes
- Returns:
- current set of live nodes that are supposed to host data.
-
getCollection
Returns info about the given collection if one exists.- Returns:
nullif no collection of the given name exists in the cluster.- Throws:
IOException
-
iterator
Iterator<SolrCollection> iterator()- Returns:
- an iterator over all
SolrCollections in the cluster.
-
collections
Iterable<SolrCollection> collections()Allow foreach iteration on all collections of the cluster, such as:for (SolrCollection c : cluster.collections()) {...}.
-