io.nosqlbench.nb.api.config.standard.NBConfigModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nb-api Show documentation
Show all versions of nb-api Show documentation
The top level API module for NoSQLBench. This module should have no internal
module dependencies other than the mvn-default module.
All modules within NoSQLBench can safely depend on this module with circular
dependencies. This module provides cross-cutting code infrastracture, such as
path utilities and ways of describing services used between modules.
It is also the transitive aggregation point for system-wide library dependencies
for logging and testing or similar needs.
package io.nosqlbench.nb.api.config.standard;
import java.util.List;
import java.util.Map;
/**
* This configuration model describes what is valid to submit
* for configuration for a given configurable object. Once this
* is provided by a configurable element, it is used internally
* by NoSQLBench to ensure that only valid configuration are
* given to newly built objects.
*
* It is conventional to put the config model at the bottom of any
* implementing class for quick reference.
*/
public interface NBConfigModel {
Map> getNamedParams();
List> getParams();
Class> getOf();
void assertValidConfig(Map config);
NBConfiguration apply(Map config);
Param getParam(String... name);
/**
* 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.
*
* This method mutates the map that is provided.
*
* @param sharedConfig A config map which can provide fields to multiple models
* @return A new configuration for the extracted fields only.
*/
NBConfiguration extractConfig(Map 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.
*
* This method mutates the map that is provided.
*
* @param cfg A config map which can provide fields to multiple models
* @return A new configuration for the extracted fields only.
*/
NBConfiguration extractConfig(NBConfiguration cfg);
NBConfigModel add(NBConfigModel otherModel);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy