To my understanding, the Config instance should be considered only as a sort of "template", which is used to create one instance, but may not be used to afterwards modify this instance. Although, according to a quick websearch and a look at the documentation, this is not stated explicitly, but
- all examples that I have seen so far follow the pattern of FIRST creating and the complete Config, and THEN creating the corresponding instance and
- the
addMapConfig
method (in https://github.com/hazelcast/hazelcast/blob/master/hazelcast/src/main/java/com/hazelcast/config/Config.java ) does not involve any notification mechanism. So there would at least have to be some mechanism to inform the Hazelcast instance about the changed config, but I think that such a mechanism does not exist.
From what I have read in the source code ( e.g. in https://github.com/hazelcast/hazelcast/blob/master/hazelcast/src/main/java/com/hazelcast/instance/Node.java and https://github.com/hazelcast/hazelcast/blob/master/hazelcast/src/main/java/com/hazelcast/instance/HazelcastInstanceImpl.java ), the Config is only read at construction time, and it does not seem to be possible to change the configuration after the Hazelcast instance has been created.