use of com.hazelcast.client.config.impl.YamlClientFailoverDomConfigProcessor in project hazelcast by hazelcast.
the class YamlClientFailoverConfigBuilder method parseAndBuildConfig.
private void parseAndBuildConfig(ClientFailoverConfig config) throws Exception {
YamlMapping yamlRootNode;
try {
yamlRootNode = ((YamlMapping) YamlLoader.load(in));
} catch (Exception ex) {
throw new InvalidConfigurationException("Invalid YAML configuration", ex);
}
String configRoot = getConfigRoot();
YamlNode clientFailoverRoot = yamlRootNode.childAsMapping(configRoot);
if (clientFailoverRoot == null) {
clientFailoverRoot = yamlRootNode;
}
YamlDomChecker.check(clientFailoverRoot);
Node w3cRootNode = asW3cNode(clientFailoverRoot);
replaceVariables(w3cRootNode);
importDocuments(clientFailoverRoot);
if (shouldValidateTheSchema()) {
new YamlConfigSchemaValidator().validate(yamlRootNode);
}
new YamlClientFailoverDomConfigProcessor(true, config).buildConfig(w3cRootNode);
}
Aggregations