Package org.apache.kafka.clients.admin
Class ConfigEntry
- java.lang.Object
-
- org.apache.kafka.clients.admin.ConfigEntry
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfigEntry.ConfigSource
Source of configuration entries.static class
ConfigEntry.ConfigSynonym
Class representing a configuration synonym of aConfigEntry
.static class
ConfigEntry.ConfigType
Data type of configuration entry.
-
Constructor Summary
Constructors Constructor Description ConfigEntry(String name, String value)
Create a configuration entry with the provided values.ConfigEntry(String name, String value, boolean isDefault, boolean isSensitive, boolean isReadOnly)
Deprecated.since 1.1.0.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
documentation()
Return the config documentation.boolean
equals(Object o)
int
hashCode()
boolean
isDefault()
Return whether the config value is the default or if it's been explicitly set.boolean
isReadOnly()
Return whether the config is read-only and cannot be updated.boolean
isSensitive()
Return whether the config value is sensitive.String
name()
Return the config name.ConfigEntry.ConfigSource
source()
Return the source of this configuration entry.List<ConfigEntry.ConfigSynonym>
synonyms()
Returns all config values that may be used as the value of this config along with their source, in the order of precedence.String
toString()
Override toString to redact sensitive value.ConfigEntry.ConfigType
type()
Return the config data type.String
value()
Return the value or null.
-
-
-
Constructor Detail
-
ConfigEntry
public ConfigEntry(String name, String value)
Create a configuration entry with the provided values.- Parameters:
name
- the non-null config namevalue
- the config value or null
-
ConfigEntry
@Deprecated public ConfigEntry(String name, String value, boolean isDefault, boolean isSensitive, boolean isReadOnly)
Deprecated.since 1.1.0. This constructor will be removed in a future release.Create a configuration with the provided values.- Parameters:
name
- the non-null config namevalue
- the config value or nullisDefault
- whether the config value is the default or if it's been explicitly setisSensitive
- whether the config value is sensitive, the broker never returns the value if it is sensitiveisReadOnly
- whether the config is read-only and cannot be updated
-
-
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.
-
source
public ConfigEntry.ConfigSource source()
Return the source of this configuration entry.
-
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.
-
synonyms
public List<ConfigEntry.ConfigSynonym> synonyms()
Returns all config values that may be used as the value of this config along with their source, in the order of precedence. The list starts with the value returned in this ConfigEntry. The list is empty if synonyms were not requested usingDescribeConfigsOptions.includeSynonyms(boolean)
-
type
public ConfigEntry.ConfigType type()
Return the config data type.
-
documentation
public String documentation()
Return the config documentation.
-
-