Package org.apache.solr.common

## Class LazySolrCluster

- java.lang.Object
- - org.apache.solr.common.LazySolrCluster

All Implemented Interfaces:
  `SolrCluster`

    public class LazySolrCluster
    extends Object
    implements SolrCluster

Reference implementation for SolrCluster. As much as possible fetch all the values lazily because the value of anything can change any moment Creating an instance is a low cost operation. It does not result in a network call or large object creation

### Constructor Summary

Constructors
`LazySolrCluster​(ZkStateReader zkStateReader)`

### Method Summary

All Methods Instance Methods Concrete Methods
`SimpleMap<SolrCollection>` `collections()` collections in the cluster
`SimpleMap<SolrCollection>` `collections​(boolean includeAlias)` collections in the cluster and aliases
`SimpleMap<CollectionConfig>` `configs()` Config sets in the cluster
`SimpleMap<SolrNode>` `nodes()` nodes in the cluster
`String` `overseerNode()` Name of the node in which the overseer is running
`String` `thisNode()` The name of the node in which this method is invoked from.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LazySolrCluster

    public LazySolrCluster​(ZkStateReader zkStateReader)

### Method Detail

#### collections

    public SimpleMap<SolrCollection> collections()
                                          throws SolrException

Description copied from interface: `SolrCluster`
collections in the cluster

Specified by:
  `collections` in interface `SolrCluster`
Throws:
  `SolrException`

#### collections

    public SimpleMap<SolrCollection> collections​(boolean includeAlias)
                                          throws SolrException

Description copied from interface: `SolrCluster`
collections in the cluster and aliases

Specified by:
  `collections` in interface `SolrCluster`
Throws:
  `SolrException`

#### nodes

    public SimpleMap<SolrNode> nodes()
                              throws SolrException

Description copied from interface: `SolrCluster`
nodes in the cluster

Specified by:
  `nodes` in interface `SolrCluster`
Throws:
  `SolrException`

#### configs

    public SimpleMap<CollectionConfig> configs()
                                        throws SolrException

Description copied from interface: `SolrCluster`
Config sets in the cluster

Specified by:
  `configs` in interface `SolrCluster`
Throws:
  `SolrException`

#### overseerNode

    public String overseerNode()
                        throws SolrException

Description copied from interface: `SolrCluster`
Name of the node in which the overseer is running

Specified by:
  `overseerNode` in interface `SolrCluster`
Throws:
  `SolrException`

#### thisNode

    public String thisNode()

Description copied from interface: `SolrCluster`
The name of the node in which this method is invoked from. returns null, if this is not invoked from a Solr node

Specified by:
  `thisNode` in interface `SolrCluster`