use of com.yahoo.vespa.config.buildergen.ConfigDefinition in project vespa by vespa-engine.
the class ServerCacheLoader method loadConfigDefinitionsFromPath.
/**
* Loads config definitions from a specified path into server cache and returns it.
*
* @param appPath the path to load config definitions from
*/
private void loadConfigDefinitionsFromPath(ServerCache cache, String appPath) {
if (!configCurator.exists(appPath))
return;
for (String nodeName : configCurator.getChildren(appPath)) {
String payload = configCurator.getData(appPath, nodeName);
ConfigDefinitionKey dKey = ConfigUtils.createConfigDefinitionKeyFromZKString(nodeName);
cache.addDef(dKey, new ConfigDefinition(dKey.getName(), Splitter.on("\n").splitToList(payload).toArray(new String[0])));
}
}
Aggregations