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 Constructor Description LazySolrCluster(ZkStateReader zkStateReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleMap<SolrCollection>
collections()
collections in the clusterSimpleMap<SolrCollection>
collections(boolean includeAlias)
collections in the cluster and aliasesSimpleMap<CollectionConfig>
configs()
Config sets in the clusterSimpleMap<SolrNode>
nodes()
nodes in the clusterString
overseerNode()
Name of the node in which the overseer is runningString
thisNode()
The name of the node in which this method is invoked from.
-
-
-
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 interfaceSolrCluster
- 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 interfaceSolrCluster
- Throws:
SolrException
-
nodes
public SimpleMap<SolrNode> nodes() throws SolrException
Description copied from interface:SolrCluster
nodes in the cluster- Specified by:
nodes
in interfaceSolrCluster
- Throws:
SolrException
-
configs
public SimpleMap<CollectionConfig> configs() throws SolrException
Description copied from interface:SolrCluster
Config sets in the cluster- Specified by:
configs
in interfaceSolrCluster
- 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 interfaceSolrCluster
- 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 interfaceSolrCluster
-
-