Package com.hazelcast.client.config
Class XmlClientFailoverConfigBuilder
java.lang.Object
com.hazelcast.config.AbstractConfigBuilder
com.hazelcast.config.AbstractXmlConfigHelper
com.hazelcast.config.AbstractXmlConfigBuilder
com.hazelcast.client.config.XmlClientFailoverConfigBuilder
Loads the
ClientFailoverConfig
using XML.-
Nested Class Summary
Nested classes/interfaces inherited from class com.hazelcast.config.AbstractXmlConfigBuilder
AbstractXmlConfigBuilder.ConfigType
-
Field Summary
Fields inherited from class com.hazelcast.config.AbstractXmlConfigHelper
domLevel3
-
Constructor Summary
ConstructorDescriptionLoads the client failover config using the following resolution mechanism: first it checks if a system property 'hazelcast.client.failover.config' is set.XmlClientFailoverConfigBuilder
(com.hazelcast.client.config.impl.XmlClientFailoverConfigLocator locator) Constructs aXmlClientFailoverConfigBuilder
that loads the configuration with the providedXmlClientFailoverConfigLocator
.XmlClientFailoverConfigBuilder
(String resource) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
build
(ClientFailoverConfig clientFailoverConfig) protected AbstractXmlConfigBuilder.ConfigType
protected Document
parse
(InputStream inputStream) Reads XML from InputStream and parses.setProperties
(Properties properties) Methods inherited from class com.hazelcast.config.AbstractXmlConfigBuilder
getProperties, process, setPropertiesInternal
Methods inherited from class com.hazelcast.config.AbstractXmlConfigHelper
getNamespaceType, getReleaseVersion, loadSchemaFile, schemaValidation
Methods inherited from class com.hazelcast.config.AbstractConfigBuilder
shouldValidateTheSchema
-
Constructor Details
-
XmlClientFailoverConfigBuilder
- Throws:
IOException
-
XmlClientFailoverConfigBuilder
- Throws:
IOException
-
XmlClientFailoverConfigBuilder
- Throws:
IOException
-
XmlClientFailoverConfigBuilder
-
XmlClientFailoverConfigBuilder
public XmlClientFailoverConfigBuilder()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 '.xml'.
- it checks if a hazelcast-client-failover.xml is available in the working dir
- it checks if a hazelcast-client-failover.xml is available on the classpath
- Throws:
HazelcastException
- if no failover configuration is found
-
XmlClientFailoverConfigBuilder
@PrivateApi public XmlClientFailoverConfigBuilder(com.hazelcast.client.config.impl.XmlClientFailoverConfigLocator locator) Constructs aXmlClientFailoverConfigBuilder
that loads the configuration with the providedXmlClientFailoverConfigLocator
.If the provided
XmlClientFailoverConfigLocator
isnull
, a new instance is created and the config is located in every possible places. For these places, please seeXmlClientFailoverConfigLocator
.If the provided
XmlClientFailoverConfigLocator
is notnull
, it is expected that it already located the configuration XML to load from. No further attempt to locate the configuration XML is made if the configuration XML is not located already.- Parameters:
locator
- the configured locator to use- Throws:
HazelcastException
- if no failover configuration is found
-
-
Method Details
-
parse
Description copied from class:AbstractXmlConfigBuilder
Reads XML from InputStream and parses.- Specified by:
parse
in classAbstractXmlConfigBuilder
- Parameters:
inputStream
-InputStream
to read from- Returns:
- Document after parsing XML
- Throws:
Exception
- if the XML configuration cannot be parsed or is invalid
-
getConfigType
- Specified by:
getConfigType
in classAbstractXmlConfigBuilder
- Returns:
- ConfigType of current config class as enum value
-
build
-
build
-
setProperties
-