org.apache.solr.common.cloud

Class ClusterProperties

    • Method Detail

      • getClusterProperty

        public <T> T getClusterProperty(String key,
                                        T defaultValue)
                                 throws IOException
        Read the value of a cluster property, returning a default if it is not set
        Type Parameters:
        T - the type of the property
        Parameters:
        key - the property name
        defaultValue - the default value
        Returns:
        the property value
        Throws:
        IOException - if there is an error reading the value from the cluster
      • setClusterProperty

        public void setClusterProperty(String propertyName,
                                       String propertyValue)
                                throws IOException
        This method sets a cluster property.
        Parameters:
        propertyName - The property name to be set.
        propertyValue - The value of the property.
        Throws:
        IOException - if there is an error writing data to the cluster