Class OptionHelpers
java.lang.Object
io.nosqlbench.adapter.cqld4.optionhelpers.OptionHelpers
- All Implemented Interfaces:
NBCanConfigure,NBConfigModelProvider,NBConfigurable
Provide a concise way to express configuration option helpers which simplify
usage of the long-form options with the latest driver. Essentially, make
lambda-style definition of optional parameter handling _readable_, and
provide a working blueprint for how to handle config helpers.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(String name, String description, OptionHelpers.Modifier modifier) voidImplementors should take care to ensure that this can be called after initial construction without unexpected interactions between construction parameters and configuration parameters.Implement this method by returning an instance ofConfigModel.
-
Constructor Details
-
OptionHelpers
public OptionHelpers(com.datastax.oss.driver.api.core.config.OptionsMap options)
-
-
Method Details
-
add
-
applyConfig
Description copied from interface:NBConfigurableImplementors should take care to ensure that this can be called after initial construction without unexpected interactions between construction parameters and configuration parameters.- Specified by:
applyConfigin interfaceNBCanConfigure- Specified by:
applyConfigin interfaceNBConfigurable- Parameters:
cfg- The configuration data to be applied to a new instance
-
getConfigModel
Description copied from interface:NBConfigurableImplement this method by returning an instance ofConfigModel. Any configuration which is provided to theNBConfigurable.applyConfig(NBConfiguration)method will be validated through this model. A configuration model is required in order to build a validated configuration from source data provided by a user.- Specified by:
getConfigModelin interfaceNBConfigModelProvider- Specified by:
getConfigModelin interfaceNBConfigurable- Returns:
- A valid configuration model for the implementing class
-