Package org.apache.kafka.common.config
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 java.lang.Object implements ConfigDef.Validator
Validation logic for numeric ranges
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConfigDef.Range
atLeast(java.lang.Number min)
A numeric range that checks only the lower boundstatic ConfigDef.Range
between(java.lang.Number min, java.lang.Number max)
A numeric range that checks both the upper (inclusive) and lower boundvoid
ensureValid(java.lang.String name, java.lang.Object o)
Perform single configuration validation.java.lang.String
toString()
-
-
-
Method Detail
-
atLeast
public static ConfigDef.Range atLeast(java.lang.Number min)
A numeric range that checks only the lower bound- Parameters:
min
- The minimum acceptable value
-
between
public static ConfigDef.Range between(java.lang.Number min, java.lang.Number max)
A numeric range that checks both the upper (inclusive) and lower bound
-
ensureValid
public void ensureValid(java.lang.String name, java.lang.Object o)
Description copied from interface:ConfigDef.Validator
Perform single configuration validation.- Specified by:
ensureValid
in interfaceConfigDef.Validator
- Parameters:
name
- The name of the configurationo
- The value of the configuration
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-