Class FileSystemYamlConfig


  • public class FileSystemYamlConfig
    extends Config
    A Config which includes functionality for loading itself from a YAML configuration file.

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

    • Constructor Detail

      • FileSystemYamlConfig

        public FileSystemYamlConfig​(java.lang.String configFilename)
                             throws java.io.FileNotFoundException
        Creates a Config based on a Hazelcast yaml file and uses the System.properties to resolve variables in the YAML.
        Parameters:
        configFilename - the path of the Hazelcast yaml configuration file
        Throws:
        java.lang.NullPointerException - if configFilename is null
        java.io.FileNotFoundException - if the file is not found
        InvalidConfigurationException - if the YAML content is invalid
      • FileSystemYamlConfig

        public FileSystemYamlConfig​(java.lang.String configFilename,
                                    java.util.Properties properties)
                             throws java.io.FileNotFoundException
        Creates a Config based on a Hazelcast YAML file.
        Parameters:
        configFilename - the path of the Hazelcast YAML configuration file
        properties - the Properties to resolve variables in the YAML
        Throws:
        java.io.FileNotFoundException - if the file is not found
        java.lang.NullPointerException - if configFilename is null
        java.lang.IllegalArgumentException - if properties is null
        InvalidConfigurationException - if the YAML content is invalid
      • FileSystemYamlConfig

        public FileSystemYamlConfig​(java.io.File configFile)
                             throws java.io.FileNotFoundException
        Creates a Config based on a Hazelcast yaml file and uses the System.properties to resolve variables in the YAML.
        Parameters:
        configFile - the path of the Hazelcast YAML configuration file
        Throws:
        java.io.FileNotFoundException - if the file doesn't exist
        InvalidConfigurationException - if the YAML content is invalid
      • FileSystemYamlConfig

        public FileSystemYamlConfig​(java.io.File configFile,
                                    java.util.Properties properties)
                             throws java.io.FileNotFoundException
        Creates a Config based on a Hazelcast YAML file.
        Parameters:
        configFile - the path of the Hazelcast yaml configuration file
        properties - the Properties to resolve variables in the YAML
        Throws:
        java.lang.IllegalArgumentException - if configFile or properties is null
        java.io.FileNotFoundException - if the file doesn't exist
        InvalidConfigurationException - if the YAML content is invalid