hazelcast : changing configuration programatically doesnt work

630 Views Asked by At

I am unable to configure/change the Map(declared as part of hazelcast config in spring) properties after hazelcast instance start up. I am using hazelcast integrated with spring as hibernate second level cache. I am trying to configure the properties of map (like TTL) in an init method (PostConstruct annotated) which is called during spring bean initialization.

There is not enough Documentation , if there is please guide me to it.

Mean while i went through this post and found this Hazelcast MapStoreConfig ignored

But how does the management center changes the config, will it recreate a new instance again ?

Is hazelcast Instance light weight unlike session factory ? i assume not, please share your thoughts

1

There are 1 best solutions below

0
On BEST ANSWER

This is not yet supported. JCache is the only on-the-fly configuration data structure at the moment. However you'll most probably be able to destroy a proxy (DistributedObject like IMap, IQueue, ...), reconfigure it and recreate it. Anyhow at the time of recreation you must make sure that every node sees the same configuration, for example by storing the configuration itself inside an IMap or something like that. You'll have to do some wrapping on your own.

PS: This is not officially supported and an implementation detail that might change at later versions!

PPS: This feature is on the roadmap for quite some time but didn't made it into a release version yet, it however is still expected to have full support at some time in the future.