Enum Class ConfigDef.Type

java.lang.Object
java.lang.Enum<ConfigDef.Type>
org.apache.kafka.common.config.ConfigDef.Type
All Implemented Interfaces:
Serializable, Comparable<ConfigDef.Type>, Constable
Enclosing class:
ConfigDef

public static enum ConfigDef.Type extends Enum<ConfigDef.Type>
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 Constants
    Enum Constant
    Description
    Used 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 Type
    Method
    Description
    boolean
    Whether this type contains sensitive data such as a password or key.
    Returns the enum constant of this class with the specified name.
    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

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • BOOLEAN

      public static final ConfigDef.Type BOOLEAN
      Used for boolean values. Values can be provided as a Boolean object or as a String with values true or false (this is not case-sensitive), otherwise a ConfigException is thrown.
    • STRING

      public static final ConfigDef.Type STRING
      Used for string values. Values must be provided as a String object, otherwise a ConfigException is thrown.
    • INT

      public static final ConfigDef.Type 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 a ConfigException is thrown.
    • SHORT

      public static final ConfigDef.Type 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 a ConfigException is thrown.
    • LONG

      public static final ConfigDef.Type 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 a ConfigException is thrown.
    • DOUBLE

      public static final ConfigDef.Type 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 a ConfigException is thrown.
    • LIST

      public static final ConfigDef.Type LIST
      Used for list values. Values must be provided as a List object, as a String object, otherwise a ConfigException 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

      public static final ConfigDef.Type CLASS
      Used for values that implement a Kafka interface. Values must be provided as a Class object or as a String object, otherwise a ConfigException is thrown. When the value is provided as a String it must be the binary name of the Class.
    • PASSWORD

      public static final ConfigDef.Type 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 a ConfigException is thrown.
  • Method Details

    • values

      public static ConfigDef.Type[] 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

      public static ConfigDef.Type valueOf(String name)
      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 name
      NullPointerException - 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