com.hazelcast.client.config

## Class ClientFailoverClasspathYamlConfig

- java.lang.Object
- - com.hazelcast.client.config.ClientFailoverConfig
  - - com.hazelcast.client.config.ClientFailoverClasspathYamlConfig

-     public class ClientFailoverClasspathYamlConfig
      extends ClientFailoverConfig

  A `ClientFailoverConfig` which is initialized by loading a YAML configuration file from the classpath.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientFailoverClasspathYamlConfig(ClassLoader classLoader, String resource, Properties properties)` Creates a config which is loaded from a classpath resource.
    `ClientFailoverClasspathYamlConfig(String resource)` Creates a config which is loaded from a classpath resource using the `Thread.currentThread()` contextClassLoader.
    `ClientFailoverClasspathYamlConfig(String resource, Properties properties)` Creates a config which is loaded from a classpath resource using the `Thread.currentThread()` contextClassLoader.

  - ### Method Summary

    - ### Methods inherited from class com.hazelcast.client.config.ClientFailoverConfig

      `addClientConfig, getClientConfigs, getTryCount, setClientConfigs, setTryCount`

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

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

- - ### Constructor Detail

    - #### ClientFailoverClasspathYamlConfig

          public ClientFailoverClasspathYamlConfig(String resource)

      Creates a config which is loaded from a classpath resource using the `Thread.currentThread()` contextClassLoader. The System.properties are used to resolve variables in the YAML.
      Parameters:
        `resource` - the resource, a YAML configuration file from the classpath, without the "classpath:" prefix
      Throws:
        `IllegalArgumentException` - if the resource could not be found
        `InvalidConfigurationException` - if the YAML content is invalid

    - #### ClientFailoverClasspathYamlConfig

          public ClientFailoverClasspathYamlConfig(String resource,
                                                   Properties properties)

      Creates a config which is loaded from a classpath resource using the `Thread.currentThread()` contextClassLoader.
      Parameters:
        `resource` - the resource, a YAML configuration file from the classpath, without the "classpath:" prefix
        `properties` - the Properties to resolve variables in the YAML
      Throws:
        `IllegalArgumentException` - if the resource could not be found or if properties is `null`
        `InvalidConfigurationException` - if the YAML content is invalid

    - #### ClientFailoverClasspathYamlConfig

          public ClientFailoverClasspathYamlConfig(ClassLoader classLoader,
                                                   String resource,
                                                   Properties properties)

      Creates a config which is loaded from a classpath resource.
      Parameters:
        `classLoader` - the ClassLoader used to load the resource
        `resource` - the resource, a YAML configuration file from the classpath, without the "classpath:" prefix
        `properties` - the properties used to resolve variables in the YAML
      Throws:
        `IllegalArgumentException` - if classLoader or resource is `null`, or if the resource is not found
        `InvalidConfigurationException` - if the YAML content is invalid

Copyright © 2020. All rights reserved.