com.hazelcast.client.config

## Class YamlClientFailoverConfigBuilder

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

-     public class YamlClientFailoverConfigBuilder
      extends AbstractYamlConfigBuilder

  Loads the `ClientFailoverConfig` using YAML.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `YamlClientFailoverConfigBuilder()` Loads the client failover config using the following resolution mechanism: first it checks if a system property 'hazelcast.client.failover.config' is set.
    `YamlClientFailoverConfigBuilder(File file)`
    `YamlClientFailoverConfigBuilder(InputStream in)`
    `YamlClientFailoverConfigBuilder(String resource)`
    `YamlClientFailoverConfigBuilder(URL url)`
    `YamlClientFailoverConfigBuilder(YamlClientFailoverConfigLocator locator)` Constructs a `YamlClientFailoverConfigBuilder` that loads the configuration with the provided `YamlClientFailoverConfigLocator`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClientFailoverConfig` | `build()`
    `protected String` | `getConfigRoot()`
    `void` | `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

    - #### YamlClientFailoverConfigBuilder

          public YamlClientFailoverConfigBuilder(String resource)
                                          throws IOException

      Throws:
        `IOException`

    - #### YamlClientFailoverConfigBuilder

          public YamlClientFailoverConfigBuilder(File file)
                                          throws IOException

      Throws:
        `IOException`

    - #### YamlClientFailoverConfigBuilder

          public YamlClientFailoverConfigBuilder(URL url)
                                          throws IOException

      Throws:
        `IOException`

    - #### YamlClientFailoverConfigBuilder

          public YamlClientFailoverConfigBuilder(InputStream in)

    - #### YamlClientFailoverConfigBuilder

          public YamlClientFailoverConfigBuilder()

      Loads the client failover config using the following resolution mechanism:
      1. first it checks if a system property 'hazelcast.client.failover.config' is set. If it exist and it begins with 'classpath:', then a classpath resource is loaded. Else it will assume it is a file reference. The configuration file or resource will be loaded only if the postfix of its name ends with '.yaml'.
      2. it checks if a hazelcast-client-failover.yaml is available in the working dir
      3. it checks if a hazelcast-client-failover.yaml is available on the classpath
      Throws:
        `HazelcastException` - if no failover configuration is found

    - #### YamlClientFailoverConfigBuilder

          public YamlClientFailoverConfigBuilder(YamlClientFailoverConfigLocator locator)

      Constructs a `YamlClientFailoverConfigBuilder` that loads the configuration with the provided `YamlClientFailoverConfigLocator`.

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

      If the provided `YamlClientFailoverConfigLocator` 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
      Throws:
        `HazelcastException` - if no failover configuration is found

  - ### Method Detail

    - #### build

          public ClientFailoverConfig build()

    - #### setProperties

          public void setProperties(Properties properties)

    - #### getConfigRoot

          protected String getConfigRoot()

      Specified by:
        `getConfigRoot` in class `AbstractYamlConfigBuilder`

Copyright © 2020. All rights reserved.