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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterable<SolrCollection>
collections()
Allow foreach iteration on all collections of the cluster, such as:for (SolrCollection c : cluster.collections()) {...}
.SolrCollection
getCollection(String collectionName)
Returns info about the given collection if one exists.Set<Node>
getLiveDataNodes()
Set<Node>
getLiveNodes()
Iterator<SolrCollection>
iterator()
-
-
-
Method Detail
-
getLiveDataNodes
Set<Node> getLiveDataNodes()
- Returns:
- current set of live nodes that are supposed to host data.
-
getCollection
SolrCollection getCollection(String collectionName) throws IOException
Returns info about the given collection if one exists.- Returns:
null
if no collection of the given name exists in the cluster.- Throws:
IOException
-
iterator
Iterator<SolrCollection> iterator()
- Returns:
- an iterator over all
SolrCollection
s in the cluster.
-
collections
Iterable<SolrCollection> collections()
Allow foreach iteration on all collections of the cluster, such as:for (SolrCollection c : cluster.collections()) {...}
.
-
-