Class ConfigDef.Range
java.lang.Object
org.apache.kafka.common.config.ConfigDef.Range
- All Implemented Interfaces:
ConfigDef.Validator
- Enclosing class:
ConfigDef
Validation logic for numeric ranges
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigDef.RangeA numeric range that checks only the lower boundstatic ConfigDef.RangeA numeric range that checks only the upper (inclusive) boundstatic ConfigDef.RangeA numeric range that checks both the upper (inclusive) and lower boundvoidensureValid(String name, Object o) Perform single configuration validation.static ConfigDef.RangeA numeric range that checks for an exact valuetoString()
-
Method Details
-
atLeast
A numeric range that checks only the lower bound- Parameters:
min- The minimum acceptable value
-
atMost
A numeric range that checks only the upper (inclusive) bound- Parameters:
max- The minimum acceptable value
-
between
A numeric range that checks both the upper (inclusive) and lower bound -
exactly
A numeric range that checks for an exact value- Parameters:
value- The only acceptable value
-
ensureValid
Description copied from interface:ConfigDef.ValidatorPerform single configuration validation.- Specified by:
ensureValidin interfaceConfigDef.Validator- Parameters:
name- The name of the configurationo- The value of the configuration
-
toString
-