mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
NBConfiguration docs
This commit is contained in:
@@ -111,7 +111,7 @@ public class ConfigModel implements NBConfigModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NBConfiguration extract(Map<String, ?> sharedConfig) {
|
public NBConfiguration extractConfig(Map<String, ?> sharedConfig) {
|
||||||
LinkedHashMap<String, Object> extracted = new LinkedHashMap<>();
|
LinkedHashMap<String, Object> extracted = new LinkedHashMap<>();
|
||||||
for (String providedCfgField : sharedConfig.keySet()) {
|
for (String providedCfgField : sharedConfig.keySet()) {
|
||||||
if (getNamedParams().containsKey(providedCfgField)) {
|
if (getNamedParams().containsKey(providedCfgField)) {
|
||||||
@@ -122,8 +122,8 @@ public class ConfigModel implements NBConfigModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NBConfiguration extract(NBConfiguration cfg) {
|
public NBConfiguration extractConfig(NBConfiguration cfg) {
|
||||||
return extract(cfg.getMap());
|
return extractConfig(cfg.getMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void assertDistinctSynonyms(Map<String, ?> config) {
|
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
|
* @param sharedConfig A config map which can provide fields to multiple models
|
||||||
* @return A new configuration for the extracted fields only.
|
* @return A new configuration for the extracted fields only.
|
||||||
*/
|
*/
|
||||||
NBConfiguration extract(Map<String, ?> sharedConfig);
|
NBConfiguration extractConfig(Map<String, ?> sharedConfig);
|
||||||
NBConfiguration extract(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.
|
||||||
|
*
|
||||||
|
* <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);
|
NBConfigModel add(NBConfigModel otherModel);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user