mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-01-06 22:13:08 -06:00
NBConfiguration docs
This commit is contained in:
parent
00047164ae
commit
af5c516744
@ -111,7 +111,7 @@ public class ConfigModel implements NBConfigModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBConfiguration extract(Map<String, ?> sharedConfig) {
|
||||
public NBConfiguration extractConfig(Map<String, ?> sharedConfig) {
|
||||
LinkedHashMap<String, Object> extracted = new LinkedHashMap<>();
|
||||
for (String providedCfgField : sharedConfig.keySet()) {
|
||||
if (getNamedParams().containsKey(providedCfgField)) {
|
||||
@ -122,8 +122,8 @@ public class ConfigModel implements NBConfigModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBConfiguration extract(NBConfiguration cfg) {
|
||||
return extract(cfg.getMap());
|
||||
public NBConfiguration extractConfig(NBConfiguration cfg) {
|
||||
return extractConfig(cfg.getMap());
|
||||
}
|
||||
|
||||
private void assertDistinctSynonyms(Map<String, ?> config) {
|
||||
|
@ -37,8 +37,19 @@ public interface NBConfigModel {
|
||||
* @param sharedConfig A config map which can provide fields to multiple models
|
||||
* @return A new configuration for the extracted fields only.
|
||||
*/
|
||||
NBConfiguration extract(Map<String, ?> sharedConfig);
|
||||
NBConfiguration extract(NBConfiguration cfg);
|
||||
NBConfiguration extractConfig(Map<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.
|
||||
*
|
||||
* <em>This method mutates the map that is provided.</em>
|
||||
*
|
||||
* @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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user