@Override public void configure(final Env env, final Config conf, final Binder binder) { com.hazelcast.config.Config config = new com.hazelcast.config.Config(); config.setProperties(toProperties(conf.getConfig("hazelcast"))); if (configurer != null) { configurer.accept(config, conf); } HazelcastInstance hcast = Hazelcast.newHazelcastInstance(config); binder.bind(com.hazelcast.config.Config.class).toInstance(config); binder.bind(HazelcastInstance.class).toInstance(hcast); env.onStop(hcast::shutdown); }
@Override public Config setProperties(Properties properties) { return staticConfig.setProperties(properties); }
@Override public Config setProperties(Properties properties) { return staticConfig.setProperties(properties); }
@Override public void configure(final Env env, final Config conf, final Binder binder) { com.hazelcast.config.Config config = new com.hazelcast.config.Config(); config.setProperties(toProperties(conf.getConfig("hazelcast"))); if (configurer != null) { configurer.accept(config, conf); } HazelcastInstance hcast = Hazelcast.newHazelcastInstance(config); binder.bind(com.hazelcast.config.Config.class).toInstance(config); binder.bind(HazelcastInstance.class).toInstance(hcast); env.onStop(hcast::shutdown); }