Class InMemoryYamlConfig


  • public class InMemoryYamlConfig
    extends Config
    Creates a Config loaded from an in-memory Hazelcast YAML String.

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

    • Constructor Detail

      • InMemoryYamlConfig

        public InMemoryYamlConfig​(java.lang.String yaml)
        Creates a Config from the provided YAML string and uses the System.properties to resolve variables in the YAML.
        Parameters:
        yaml - the YAML content as a Hazelcast YAML String
        Throws:
        java.lang.IllegalArgumentException - if the YAML is null or empty
        InvalidConfigurationException - if the YAML content is invalid
      • InMemoryYamlConfig

        public InMemoryYamlConfig​(java.lang.String yaml,
                                  java.util.Properties properties)
        Creates a Config from the provided YAML string and properties to resolve the variables in the YAML.
        Parameters:
        yaml - the YAML content as a Hazelcast YAML String
        Throws:
        java.lang.IllegalArgumentException - if the YAML is null or empty or if properties is null
        InvalidConfigurationException - if the YAML content is invalid