How to set backup-count via code on Hazelcast?

China☆狼群 提交于 2021-01-29 06:10:29
问题 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:/