cal
cal

Reputation: 121

Programmatic property setting for all maps in Hazelcast?

Is there a way to programmatically set the default "backup-count" property for all distributed maps in Hazelcast?

Using Hazelcast version 3.7.4

Upvotes: 2

Views: 498

Answers (1)

Alparslan Avci
Alparslan Avci

Reputation: 981

You can set the default "backup-count" for all maps by using the code below:

Config config = new Config();
config.getMapConfig("default").setBackupCount(BACKUP_COUNT);
HazelcastInstance hazelcast = Hazelcast.newHazelcastInstance(config);

where the BACKUP_COUNT is the backup count you want to set.

Upvotes: 3

Related Questions