Package org.apache.hadoop.fs.azurebfs.diagnostics
Class IntegerConfigurationBasicValidator
java.lang.Object
org.apache.hadoop.fs.azurebfs.diagnostics.IntegerConfigurationBasicValidator
- All Implemented Interfaces:
org.apache.hadoop.fs.azurebfs.contracts.diagnostics.ConfigurationValidator
@Public
@Evolving
public class IntegerConfigurationBasicValidator
extends Object
implements org.apache.hadoop.fs.azurebfs.contracts.diagnostics.ConfigurationValidator
Integer configuration value Validator.
-
Constructor Summary
ConstructorsConstructorDescriptionIntegerConfigurationBasicValidator(int outlier, int min, int max, int defaultVal, String configKey, boolean throwIfInvalid) IntegerConfigurationBasicValidator(int min, int max, int defaultVal, String configKey, boolean throwIfInvalid) -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis method handles the base case where the configValue is null, based on the throwIfInvalid it either throws or returns the defaultVal, otherwise it returns null indicating that the configValue needs to be validated further.
-
Constructor Details
-
IntegerConfigurationBasicValidator
public IntegerConfigurationBasicValidator(int min, int max, int defaultVal, String configKey, boolean throwIfInvalid) -
IntegerConfigurationBasicValidator
public IntegerConfigurationBasicValidator(int outlier, int min, int max, int defaultVal, String configKey, boolean throwIfInvalid)
-
-
Method Details
-
validate
This method handles the base case where the configValue is null, based on the throwIfInvalid it either throws or returns the defaultVal, otherwise it returns null indicating that the configValue needs to be validated further.- Specified by:
validatein interfaceorg.apache.hadoop.fs.azurebfs.contracts.diagnostics.ConfigurationValidator- Parameters:
configValue- the configuration value set by the user- Returns:
- the defaultVal in case the configValue is null and not required to be set, null in case the configValue not null
- Throws:
InvalidConfigurationValueException- in case the configValue is null and required to be set
-
getDefaultVal
-
getConfigKey
-
getThrowIfInvalid
public boolean getThrowIfInvalid()
-