Search code examples
hazelcasthazelcast-aggregate

How to set backup-count via code on Hazelcast?


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


Solution

  • 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);