Class ConfigEntry


  • @Evolving
    public class ConfigEntry
    extends Object
    A class representing a configuration entry containing name, value and additional metadata. The API of this class is evolving, see Admin for details.
    • Constructor Detail

      • ConfigEntry

        public ConfigEntry​(String name,
                           String value)
        Create a configuration entry with the provided values.
        Parameters:
        name - the non-null config name
        value - the config value or null
      • ConfigEntry

        public ConfigEntry​(String name,
                           String value,
                           ConfigEntry.ConfigSource source,
                           boolean isSensitive,
                           boolean isReadOnly,
                           List<ConfigEntry.ConfigSynonym> synonyms,
                           ConfigEntry.ConfigType type,
                           String documentation)
        Create a configuration with the provided values.
        Parameters:
        name - the non-null config name
        value - the config value or null
        source - the source of this config entry
        isSensitive - whether the config value is sensitive, the broker never returns the value if it is sensitive
        isReadOnly - whether the config is read-only and cannot be updated
        synonyms - Synonym configs in order of precedence
    • Method Detail

      • name

        public String name()
        Return the config name.
      • value

        public String value()
        Return the value or null. Null is returned if the config is unset or if isSensitive is true.
      • isDefault

        public boolean isDefault()
        Return whether the config value is the default or if it's been explicitly set.
      • isSensitive

        public boolean isSensitive()
        Return whether the config value is sensitive. The value is always set to null by the broker if the config value is sensitive.
      • isReadOnly

        public boolean isReadOnly()
        Return whether the config is read-only and cannot be updated.
      • documentation

        public String documentation()
        Return the config documentation.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Override toString to redact sensitive value. WARNING, user should be responsible to set the correct "isSensitive" field for each config entry.
        Overrides:
        toString in class Object