Package org.apache.solr.common.cloud
Class CollectionProperties
- java.lang.Object
- 
- org.apache.solr.common.cloud.CollectionProperties
 
- 
 public class CollectionProperties extends Object Interact with solr collection properties Note that all methods on this class make calls to ZK on every invocation. For read-only eventually-consistent uses, clients should instead callZkStateReader.getCollectionProperties(String)
- 
- 
Constructor SummaryConstructors Constructor Description CollectionProperties(SolrZkClient client)Creates a CollectionProperties object using a provided SolrZkClient
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getCollectionProperties(String collection)Return the collection propertiesStringgetCollectionProperty(String collection, String key, String defaultValue)Read the value of a collection property, returning a default if it is not setvoidsetCollectionProperty(String collection, String propertyName, String propertyValue)This method sets a collection property.
 
- 
- 
- 
Constructor Detail- 
CollectionPropertiespublic CollectionProperties(SolrZkClient client) Creates a CollectionProperties object using a provided SolrZkClient
 
- 
 - 
Method Detail- 
getCollectionPropertypublic String getCollectionProperty(String collection, String key, String defaultValue) throws IOException Read the value of a collection property, returning a default if it is not set- Parameters:
- key- the property name
- defaultValue- the default value
- Returns:
- the property value
- Throws:
- IOException- if there is an error reading the value from zookeeper
 
 - 
getCollectionPropertiespublic Map<String,String> getCollectionProperties(String collection) throws IOException Return the collection properties- Throws:
- IOException- if there is an error reading properties from zookeeper
 
 - 
setCollectionPropertypublic void setCollectionProperty(String collection, String propertyName, String propertyValue) throws IOException This method sets a collection property.- Parameters:
- collection- The property name to be set.
- propertyName- The property name to be set.
- propertyValue- The value of the property.
- Throws:
- IOException- if there is an error writing data to zookeeper
 
 
- 
 
-