Package com.hazelcast.client.config
Class YamlClientFailoverConfigBuilder
java.lang.Object
com.hazelcast.config.AbstractConfigBuilder
com.hazelcast.config.AbstractYamlConfigBuilder
com.hazelcast.client.config.YamlClientFailoverConfigBuilder
Loads the
ClientFailoverConfig using YAML.-
Constructor Summary
ConstructorsConstructorDescriptionLoads the client failover config using the following resolution mechanism: first it checks if a system property 'hazelcast.client.failover.config' is set.YamlClientFailoverConfigBuilder(com.hazelcast.client.config.impl.YamlClientFailoverConfigLocator locator) Constructs aYamlClientFailoverConfigBuilderthat loads the configuration with the providedYamlClientFailoverConfigLocator.YamlClientFailoverConfigBuilder(String resource) -
Method Summary
Methods inherited from class com.hazelcast.config.AbstractYamlConfigBuilder
getProperties, importDocuments, replaceVariables, setPropertiesInternalMethods inherited from class com.hazelcast.config.AbstractConfigBuilder
shouldValidateTheSchema
-
Constructor Details
-
YamlClientFailoverConfigBuilder
- Throws:
IOException
-
YamlClientFailoverConfigBuilder
- Throws:
IOException
-
YamlClientFailoverConfigBuilder
- Throws:
IOException
-
YamlClientFailoverConfigBuilder
-
YamlClientFailoverConfigBuilder
public YamlClientFailoverConfigBuilder()Loads the client failover config using the following resolution mechanism:- first it checks if a system property 'hazelcast.client.failover.config' is set. If it exist and it begins with 'classpath:', then a classpath resource is loaded. Else it will assume it is a file reference. The configuration file or resource will be loaded only if the postfix of its name ends with '.yaml'.
- it checks if a hazelcast-client-failover.yaml is available in the working dir
- it checks if a hazelcast-client-failover.yaml is available on the classpath
- Throws:
HazelcastException- if no failover configuration is found
-
YamlClientFailoverConfigBuilder
@PrivateApi public YamlClientFailoverConfigBuilder(com.hazelcast.client.config.impl.YamlClientFailoverConfigLocator locator) Constructs aYamlClientFailoverConfigBuilderthat loads the configuration with the providedYamlClientFailoverConfigLocator.If the provided
YamlClientFailoverConfigLocatorisnull, a new instance is created and the config is located in every possible places. For these places, please seeYamlClientFailoverConfigLocator.If the provided
YamlClientFailoverConfigLocatoris notnull, it 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.- Parameters:
locator- the configured locator to use- Throws:
HazelcastException- if no failover configuration is found
-
-
Method Details
-
build
-
setProperties
-
getConfigRoot
- Specified by:
getConfigRootin classAbstractYamlConfigBuilder
-