public abstract class OptionValidator extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OptionValidator.OptionDescription |
Constructor and Description |
---|
OptionValidator(String optionName,
OptionValidator.OptionDescription description)
By default, if admin option value is not specified, it would be set to false.
|
Modifier and Type | Method and Description |
---|---|
String |
getConfigProperty() |
abstract OptionValue.Kind |
getKind()
Gets the kind of this option value for this validator.
|
OptionValidator.OptionDescription |
getOptionDescription()
Get the option description (long and short)
|
String |
getOptionName()
Gets the name of the option for this validator.
|
int |
getTtl()
If an option is short-lived, this method returns the number of queries for which the option is valid.
|
boolean |
isShortLived()
This function returns true if and only if this validator is meant for a short-lived option.
|
abstract void |
validate(OptionValue value,
OptionMetaData optionMetaData,
OptionSet manager)
Validates the option value.
|
public OptionValidator(String optionName, OptionValidator.OptionDescription description)
public String getOptionName()
public OptionValidator.OptionDescription getOptionDescription()
public boolean isShortLived()
getTtl()
.
E.g. ExecutionControls.ControlsOptionValidator
public int getTtl()
isShortLived()
public abstract void validate(OptionValue value, OptionMetaData optionMetaData, OptionSet manager)
value
- the value to validatemanager
- the manager for accessing validation dependencies (options)UserException
- message to describe error with value, including range or list of expected valuespublic abstract OptionValue.Kind getKind()
public String getConfigProperty()
Copyright © 1970 The Apache Software Foundation. All rights reserved.