public class YamlConfigBuilder extends AbstractYamlConfigBuilder implements ConfigBuilder
This config builder is compatible with the YAML 1.2 specification and supports the JSON Schema.
|Constructor and Description|
Constructs a YamlConfigBuilder that tries to find a usable YAML configuration file.
Constructs a YAMLConfigBuilder that reads from the given InputStream.
Constructs a YamlConfigBuilder that reads from the provided YAML file.
Constructs a YamlConfigBuilder that reads from the given URL.
|Modifier and Type||Method and Description|
Builds Config object.
getProperties, importDocuments, replaceVariables, setPropertiesInternal
public YamlConfigBuilder(String yamlFileName) throws FileNotFoundException
yamlFileName- the name of the YAML file that the YamlConfigBuilder reads from
FileNotFoundException- if the file can't be found
public YamlConfigBuilder(InputStream inputStream)
inputStream- the InputStream containing the YAML configuration
IllegalArgumentException- if inputStream is
public YamlConfigBuilder(URL url) throws IOException
url- the given url that the YamlConfigBuilder reads from
IOException- if URL is invalid
@PrivateApi public YamlConfigBuilder(com.hazelcast.internal.config.YamlConfigLocator locator)
YamlConfigBuilderthat loads the configuration with the provided
If the provided
null, a new
instance is created and the config is located in every possible
places. For these places, please see
If the provided
YamlConfigLocator is not
is expected that it already located the configuration YAML to load
from. No further attempt to locate the configuration YAML is made
if the configuration YAML is not located already.
locator- the configured locator to use
public Config build()
public YamlConfigBuilder setProperties(Properties properties)
protected String getConfigRoot()
Copyright © 2022 Hazelcast, Inc.. All rights reserved.