com.hazelcast.config

## Class YamlConfigBuilder

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

- All Implemented Interfaces:
    ConfigBuilder

      public class YamlConfigBuilder
      extends AbstractYamlConfigBuilder
      implements ConfigBuilder

  A YAML `ConfigBuilder` implementation.

  This config builder is compatible with the YAML 1.2 specification and supports the JSON Schema.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `YamlConfigBuilder()` Constructs a YamlConfigBuilder that tries to find a usable YAML configuration file.
    `YamlConfigBuilder(InputStream inputStream)` Constructs a YAMLConfigBuilder that reads from the given InputStream.
    `YamlConfigBuilder(String yamlFileName)` Constructs a YamlConfigBuilder that reads from the provided YAML file.
    `YamlConfigBuilder(URL url)` Constructs a YamlConfigBuilder that reads from the given URL.
    `YamlConfigBuilder(YamlConfigLocator locator)` Constructs a `YamlConfigBuilder` that loads the configuration with the provided `YamlConfigLocator`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Config` | `build()` Builds Config object.
    `protected String` | `getConfigRoot()`
    `YamlConfigBuilder` | `setProperties(Properties properties)`

    - ### Methods inherited from class com.hazelcast.config.AbstractYamlConfigBuilder

      `getProperties, importDocuments, replaceVariables, setPropertiesInternal`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### YamlConfigBuilder

          public YamlConfigBuilder(String yamlFileName)
                            throws FileNotFoundException

      Constructs a YamlConfigBuilder that reads from the provided YAML file.
      Parameters:
        `yamlFileName` - the name of the YAML file that the YamlConfigBuilder reads from
      Throws:
        `FileNotFoundException` - if the file can't be found

    - #### YamlConfigBuilder

          public YamlConfigBuilder(InputStream inputStream)

      Constructs a YAMLConfigBuilder that reads from the given InputStream.
      Parameters:
        `inputStream` - the InputStream containing the YAML configuration
      Throws:
        `IllegalArgumentException` - if inputStream is `null`

    - #### YamlConfigBuilder

          public YamlConfigBuilder(URL url)
                            throws IOException

      Constructs a YamlConfigBuilder that reads from the given URL.
      Parameters:
        `url` - the given url that the YamlConfigBuilder reads from
      Throws:
        `IOException` - if URL is invalid

    - #### YamlConfigBuilder

          public YamlConfigBuilder()

      Constructs a YamlConfigBuilder that tries to find a usable YAML configuration file.

    - #### YamlConfigBuilder

          public YamlConfigBuilder(YamlConfigLocator locator)

      Constructs a `YamlConfigBuilder` that loads the configuration with the provided `YamlConfigLocator`.

      If the provided `YamlConfigLocator` is `null`, a new instance is created and the config is located in every possible places. For these places, please see `YamlConfigLocator`.

      If the provided `YamlConfigLocator` is not `null`, it is expected that it already located the configuration YAML to load from. No further attempt to locate the configuration YAML is made if the configuration YAML is not located already.
      Parameters:
        `locator` - the configured locator to use

  - ### Method Detail

    - #### build

          public Config build()

      Description copied from interface: `ConfigBuilder`
      Builds Config object.
      Specified by:
        `build` in interface `ConfigBuilder`
      Returns:
        Built Config object

    - #### setProperties

          public YamlConfigBuilder setProperties(Properties properties)

    - #### getConfigRoot

          protected String getConfigRoot()

      Specified by:
        `getConfigRoot` in class `AbstractYamlConfigBuilder`

Copyright © 2019. All rights reserved.