问题
Is there any way to set backup-count dynamically on Hazelcast via java? Reading the official documentation, I could only find the configuration option backup-count but no reference on how to set it via java.
Thank You Very Much, Geraldo Netto
回答1:
You can always set Hazelcast config parameters using XML, YAML, or Java. The configuration looks the same. In the case of the backup-count, you can set it in Java using the following code:
config.getMapConfig("my-map").setBackupCount(2);
来源:https://stackoverflow.com/questions/65215497/how-to-set-backup-count-via-code-on-hazelcast