Search in sources :

Example 1 with UrlXmlConfig

use of com.hazelcast.config.UrlXmlConfig in project qi4j-sdk by Qi4j.

the class HazelcastEntityStoreMixin method createConfig.

private Config createConfig(HazelcastConfiguration configuration) throws IOException {
    String hzConfLocation = configuration.configXmlLocation().get();
    if (hzConfLocation == null || hzConfLocation.isEmpty()) {
        hzConfLocation = "hazelcast-default.xml";
    }
    Config conf;
    if (hzConfLocation.contains(":")) {
        conf = new UrlXmlConfig(hzConfLocation);
    } else {
        conf = new ClasspathXmlConfig(hzConfLocation);
    }
    return conf;
}
Also used : UrlXmlConfig(com.hazelcast.config.UrlXmlConfig) Config(com.hazelcast.config.Config) UrlXmlConfig(com.hazelcast.config.UrlXmlConfig) ClasspathXmlConfig(com.hazelcast.config.ClasspathXmlConfig) ClasspathXmlConfig(com.hazelcast.config.ClasspathXmlConfig)

Aggregations

ClasspathXmlConfig (com.hazelcast.config.ClasspathXmlConfig)1 Config (com.hazelcast.config.Config)1 UrlXmlConfig (com.hazelcast.config.UrlXmlConfig)1