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 clusterStringoverseerNode()Name of the node in which the overseer is runningStringthisNode()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:SolrClustercollections in the cluster- Specified by:
collectionsin interfaceSolrCluster- Throws:
SolrException
-
collections
public SimpleMap<SolrCollection> collections(boolean includeAlias) throws SolrException
Description copied from interface:SolrClustercollections in the cluster and aliases- Specified by:
collectionsin interfaceSolrCluster- Throws:
SolrException
-
nodes
public SimpleMap<SolrNode> nodes() throws SolrException
Description copied from interface:SolrClusternodes in the cluster- Specified by:
nodesin interfaceSolrCluster- Throws:
SolrException
-
configs
public SimpleMap<CollectionConfig> configs() throws SolrException
Description copied from interface:SolrClusterConfig sets in the cluster- Specified by:
configsin interfaceSolrCluster- Throws:
SolrException
-
overseerNode
public String overseerNode() throws SolrException
Description copied from interface:SolrClusterName of the node in which the overseer is running- Specified by:
overseerNodein interfaceSolrCluster- Throws:
SolrException
-
thisNode
public String thisNode()
Description copied from interface:SolrClusterThe name of the node in which this method is invoked from. returns null, if this is not invoked from a Solr node- Specified by:
thisNodein interfaceSolrCluster
-
-