com.hazelcast.config

## Class AbstractYamlConfigBuilder

- java.lang.Object
- - com.hazelcast.config.AbstractYamlConfigBuilder

- Direct Known Subclasses:
    YamlClientConfigBuilder, YamlClientFailoverConfigBuilder, YamlConfigBuilder

      public abstract class AbstractYamlConfigBuilder
      extends Object

  Contains logic for replacing system variables in the YAML file and importing YAML files from different locations.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractYamlConfigBuilder()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract String` | `getConfigRoot()`
    `protected Properties` | `getProperties()` 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 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractYamlConfigBuilder

          public AbstractYamlConfigBuilder()

  - ### Method Detail

    - #### getProperties

          protected Properties getProperties()

      Gets the current used properties. Can be null if no properties are set.
      Returns:
        the current used properties
      See Also:
        `setPropertiesInternal(Properties)`

    - #### importDocuments

          protected void importDocuments(com.hazelcast.internal.yaml.YamlNode imdgRoot)
                                  throws Exception

      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

          protected abstract String getConfigRoot()

    - #### replaceVariables

          protected void replaceVariables(Node node)
                                   throws Exception

      Throws:
        `Exception`

    - #### setPropertiesInternal

          protected void setPropertiesInternal(Properties properties)

Copyright © 2020. All rights reserved.