Package org.apache.kafka.common.config
Enum Class ConfigDef.Type
- All Implemented Interfaces:
Serializable
,Comparable<ConfigDef.Type>
,Constable
- Enclosing class:
- ConfigDef
The type for a configuration value
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUsed for boolean values.Used for values that implement a Kafka interface.Used for numerical values within the Java Double range.Used for numerical values within the Java Integer range.Used for list values.Used for numerical values within the Java Long range.Used for string values containing sensitive data such as a password or key.Used for numerical values within the Java Short range.Used for string values. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether this type contains sensitive data such as a password or key.static ConfigDef.Type
Returns the enum constant of this class with the specified name.static ConfigDef.Type[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
BOOLEAN
Used for boolean values. Values can be provided as a Boolean object or as a String with valuestrue
orfalse
(this is not case-sensitive), otherwise aConfigException
is thrown. -
STRING
Used for string values. Values must be provided as a String object, otherwise aConfigException
is thrown. -
INT
Used for numerical values within the Java Integer range. Values must be provided as a Integer object or as a String being a valid Integer value, otherwise aConfigException
is thrown. -
SHORT
Used for numerical values within the Java Short range. Values must be provided as a Short object or as a String being a valid Short value, otherwise aConfigException
is thrown. -
LONG
Used for numerical values within the Java Long range. Values must be provided as a Long object, as an Integer object or as a String being a valid Long value, otherwise aConfigException
is thrown. -
DOUBLE
Used for numerical values within the Java Double range. Values must be provided as a Number object, as a Double object or as a String being a valid Double value, otherwise aConfigException
is thrown. -
LIST
Used for list values. Values must be provided as a List object, as a String object, otherwise aConfigException
is thrown. When the value is provided as a String it must use commas to separate the different entries (for example:first-entry, second-entry
) and an empty String maps to an empty List. -
CLASS
Used for values that implement a Kafka interface. Values must be provided as a Class object or as a String object, otherwise aConfigException
is thrown. When the value is provided as a String it must be the binary name of the Class. -
PASSWORD
Used for string values containing sensitive data such as a password or key. The values of configurations with of this type are not included in logs and instead replaced with "[hidden]". Values must be provided as a String object, otherwise aConfigException
is thrown.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isSensitive
public boolean isSensitive()Whether this type contains sensitive data such as a password or key.- Returns:
- true if the type is
PASSWORD
-