Class UrlYamlConfig

java.lang.Object
com.hazelcast.config.Config
com.hazelcast.config.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 Details

    • UrlYamlConfig

      public UrlYamlConfig(String url) throws 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:
      MalformedURLException - if the url is not correct
      IOException - if something fails while loading the resource
      InvalidConfigurationException - if the YAML content is invalid
    • UrlYamlConfig

      public UrlYamlConfig(String url, Properties properties) throws 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:
      IllegalArgumentException - if properties is null
      MalformedURLException - if the url is not correct
      IOException - if something fails while loading the resource
      InvalidConfigurationException - if the YAML content is invalid
    • UrlYamlConfig

      public UrlYamlConfig(URL url) throws 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:
      IOException - if something fails while loading the resource
      IllegalArgumentException - if the url is null
      InvalidConfigurationException - if the YAML content is invalid
    • UrlYamlConfig

      public UrlYamlConfig(URL url, Properties properties) throws 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:
      IOException - if something fails while loading the resource
      IllegalArgumentException - if the url or properties is null
      InvalidConfigurationException - if the YAML content is invalid