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 Details

    • getLiveNodes

      Set<Node> getLiveNodes()
      Returns:
      current set of live nodes.
    • 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

      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()) {...}.