Java 类org.springframework.boot.autoconfigure.hazelcast.HazelcastInstanceFactory 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HazelcastInstanceConfiguration.java   
@Bean
public HazelcastInstance hazelcastInstance() throws IOException {
    Resource config = this.cacheProperties.getHazelcast().getConfig();
    Resource location = this.cacheProperties.resolveConfigLocation(config);
    if (location != null) {
        return new HazelcastInstanceFactory(location).getHazelcastInstance();
    }
    return Hazelcast.newHazelcastInstance();
}
项目:spring-boot-concourse    文件:HazelcastInstanceConfiguration.java   
@Bean
public HazelcastInstance hazelcastInstance() throws IOException {
    Resource config = this.cacheProperties.getHazelcast().getConfig();
    Resource location = this.cacheProperties.resolveConfigLocation(config);
    if (location != null) {
        return new HazelcastInstanceFactory(location).getHazelcastInstance();
    }
    return Hazelcast.newHazelcastInstance();
}
项目:contestparser    文件:HazelcastCacheConfiguration.java   
@Bean
public HazelcastCacheManager cacheManager(
        HazelcastInstance existingHazelcastInstance) throws IOException {
    Resource config = this.cacheProperties.getHazelcast().getConfig();
    Resource location = this.cacheProperties.resolveConfigLocation(config);
    if (location != null) {
        HazelcastInstance cacheHazelcastInstance = new HazelcastInstanceFactory(
                location).getHazelcastInstance();
        return new CloseableHazelcastCacheManager(cacheHazelcastInstance);
    }
    return new HazelcastCacheManager(existingHazelcastInstance);
}
项目:contestparser    文件:HazelcastCacheConfiguration.java   
@Bean
public HazelcastInstance hazelcastInstance() throws IOException {
    Resource config = this.cacheProperties.getHazelcast().getConfig();
    Resource location = this.cacheProperties.resolveConfigLocation(config);
    if (location != null) {
        new HazelcastInstanceFactory(location).getHazelcastInstance();
    }
    return Hazelcast.newHazelcastInstance();
}