Class ConfigDef.Range

java.lang.Object
org.apache.kafka.common.config.ConfigDef.Range
All Implemented Interfaces:
ConfigDef.Validator
Enclosing class:
ConfigDef

public static class ConfigDef.Range
extends Object
implements ConfigDef.Validator
Validation logic for numeric ranges
  • Method Details

    • atLeast

      public static ConfigDef.Range atLeast​(Number min)
      A numeric range that checks only the lower bound
      Parameters:
      min - The minimum acceptable value
    • between

      public static ConfigDef.Range between​(Number min, Number max)
      A numeric range that checks both the upper (inclusive) and lower bound
    • ensureValid

      public void ensureValid​(String name, Object o)
      Description copied from interface: ConfigDef.Validator
      Perform single configuration validation.
      Specified by:
      ensureValid in interface ConfigDef.Validator
      Parameters:
      name - The name of the configuration
      o - The value of the configuration
    • toString

      public String toString()
      Overrides:
      toString in class Object