Class UrlYamlConfig


  • public class UrlYamlConfig
    extends Config
    A Config which is loaded using some url pointing to a Hazelcast YAML file.

    Unlike Config.load() and its variants, a configuration constructed via UrlYamlConfig does not apply overrides found in environment variables/system properties.

    • Constructor Detail

      • UrlYamlConfig

        public UrlYamlConfig​(java.lang.String url)
                      throws java.io.IOException
        Creates new Config which is loaded from the given url and uses the System.properties to replace variables in the YAML.
        Parameters:
        url - the url pointing to the Hazelcast YAML file
        Throws:
        java.net.MalformedURLException - if the url is not correct
        java.io.IOException - if something fails while loading the resource
        InvalidConfigurationException - if the YAML content is invalid
      • UrlYamlConfig

        public UrlYamlConfig​(java.lang.String url,
                             java.util.Properties properties)
                      throws java.io.IOException
        Creates new Config which is loaded from the given url.
        Parameters:
        url - the url pointing to the Hazelcast YAML file
        properties - the properties for replacing variables
        Throws:
        java.lang.IllegalArgumentException - if properties is null
        java.net.MalformedURLException - if the url is not correct
        java.io.IOException - if something fails while loading the resource
        InvalidConfigurationException - if the YAML content is invalid
      • UrlYamlConfig

        public UrlYamlConfig​(java.net.URL url)
                      throws java.io.IOException
        Creates new Config which is loaded from the given url and uses the System.properties to replace variables in the YAML.
        Parameters:
        url - the URL pointing to the Hazelcast YAML file
        Throws:
        java.io.IOException - if something fails while loading the resource
        java.lang.IllegalArgumentException - if the url is null
        InvalidConfigurationException - if the YAML content is invalid
      • UrlYamlConfig

        public UrlYamlConfig​(java.net.URL url,
                             java.util.Properties properties)
                      throws java.io.IOException
        Creates new Config which is loaded from the given url.
        Parameters:
        url - the URL pointing to the Hazelcast YAML file
        properties - the properties for replacing variables
        Throws:
        java.io.IOException - if something fails while loading the resource
        java.lang.IllegalArgumentException - if the url or properties is null
        InvalidConfigurationException - if the YAML content is invalid