Package com.hazelcast.config
Class AbstractYamlConfigBuilder
java.lang.Object
com.hazelcast.config.AbstractConfigBuilder
com.hazelcast.config.AbstractYamlConfigBuilder
- Direct Known Subclasses:
YamlClientConfigBuilder
,YamlClientFailoverConfigBuilder
,YamlConfigBuilder
Contains logic for replacing system variables in the YAML file and importing YAML files from different locations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
protected Properties
Gets the current used properties.protected void
importDocuments
(com.hazelcast.internal.yaml.YamlNode imdgRoot) Imports external YAML documents into the provided main YAML document.protected void
replaceVariables
(Node node) protected void
setPropertiesInternal
(Properties properties) Methods inherited from class com.hazelcast.config.AbstractConfigBuilder
shouldValidateTheSchema
-
Constructor Details
-
AbstractYamlConfigBuilder
public AbstractYamlConfigBuilder()
-
-
Method Details
-
getProperties
Gets the current used properties. Can be null if no properties are set.- Returns:
- the current used properties
- See Also:
-
importDocuments
Imports external YAML documents into the provided main YAML document.Since the YAML configuration uses mappings, in order to keep the configuration defined in the main YAML document the imported document (the source) will be actually merged into the main document (the target). An example to it is defining one map in the main document, and another map in the imported document. In this case the documents should be merged to include both map configurations under the
root/map
node.- Parameters:
imdgRoot
- The root of the main YAML configuration document- Throws:
Exception
- If a YAML document to be imported can't be loaded- See Also:
-
merge(YamlNode, YamlNode)
-
getConfigRoot
-
replaceVariables
- Throws:
Exception
-
setPropertiesInternal
-