Class ConfigModel
java.lang.Object
io.nosqlbench.nb.api.config.standard.ConfigModel
- All Implemented Interfaces:
NBConfigModel
public class ConfigModel extends java.lang.Object implements NBConfigModel
-
Method Summary
Modifier and Type Method Description ConfigModeladd(NBConfigModel otherModel)<T> ConfigModeladd(Param<T> param)NBConfigurationapply(java.util.Map<java.lang.String,?> config)NBConfigModelasReadOnly()voidassertValidConfig(java.util.Map<java.lang.String,?> config)static <T> TconvertValueTo(java.lang.String configName, java.lang.String paramName, java.lang.Object value, java.lang.Class<T> type)static NBConfigurationdefacto(ActivityDef def)NBConfigurationextractConfig(NBConfiguration cfg)Extract the fields from the shared config into a separate config, removing those that are defined in this model and leaving extraneous config fields in the provided model.NBConfigurationextractConfig(java.util.Map<java.lang.String,?> sharedConfig)Extract the fields from the shared config into a separate config, removing those that are defined in this model and leaving extraneous config fields in the provided model.java.util.Map<java.lang.String,Param<?>>getNamedParams()java.lang.Class<?>getOf()Param<?>getParam(java.lang.String... names)java.util.List<Param<?>>getParams()static ConfigModelof(java.lang.Class<?> ofType)static ConfigModelof(java.lang.Class<?> ofType, Param<?>... params)ConfigModelvalidIfRegex(java.lang.String s)
-
Method Details
-
of
-
of
-
defacto
-
add
-
asReadOnly
-
getNamedParams
- Specified by:
getNamedParamsin interfaceNBConfigModel
-
getParams
- Specified by:
getParamsin interfaceNBConfigModel
-
getOf
public java.lang.Class<?> getOf()- Specified by:
getOfin interfaceNBConfigModel
-
convertValueTo
public static <T> T convertValueTo(java.lang.String configName, java.lang.String paramName, java.lang.Object value, java.lang.Class<T> type) -
extractConfig
Description copied from interface:NBConfigModelExtract the fields from the shared config into a separate config, removing those that are defined in this model and leaving extraneous config fields in the provided model. This method mutates the map that is provided.- Specified by:
extractConfigin interfaceNBConfigModel- Parameters:
sharedConfig- A config map which can provide fields to multiple models- Returns:
- A new configuration for the extracted fields only.
-
extractConfig
Description copied from interface:NBConfigModelExtract the fields from the shared config into a separate config, removing those that are defined in this model and leaving extraneous config fields in the provided model. This method mutates the map that is provided.- Specified by:
extractConfigin interfaceNBConfigModel- Parameters:
cfg- A config map which can provide fields to multiple models- Returns:
- A new configuration for the extracted fields only.
-
apply
- Specified by:
applyin interfaceNBConfigModel
-
assertValidConfig
public void assertValidConfig(java.util.Map<java.lang.String,?> config)- Specified by:
assertValidConfigin interfaceNBConfigModel
-
getParam
- Specified by:
getParamin interfaceNBConfigModel
-
validIfRegex
-
add
- Specified by:
addin interfaceNBConfigModel
-