Class XmlClientFailoverConfigBuilder

    • Constructor Detail

      • XmlClientFailoverConfigBuilder

        public XmlClientFailoverConfigBuilder​(java.lang.String resource)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • XmlClientFailoverConfigBuilder

        public XmlClientFailoverConfigBuilder​(java.io.File file)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • XmlClientFailoverConfigBuilder

        public XmlClientFailoverConfigBuilder​(java.net.URL url)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • XmlClientFailoverConfigBuilder

        public XmlClientFailoverConfigBuilder​(java.io.InputStream in)
      • XmlClientFailoverConfigBuilder

        public XmlClientFailoverConfigBuilder()
        Loads the client failover config using the following resolution mechanism:
        1. 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'.
        2. it checks if a hazelcast-client-failover.xml is available in the working dir
        3. 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 a XmlClientFailoverConfigBuilder that loads the configuration with the provided XmlClientFailoverConfigLocator.

        If the provided XmlClientFailoverConfigLocator is null, a new instance is created and the config is located in every possible places. For these places, please see XmlClientFailoverConfigLocator.

        If the provided XmlClientFailoverConfigLocator is not null, 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