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://stackoverflow.com/questions/65215497/how-to-set-backup-count-via-code-on-hazelcast

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!