Reputation: 427
1.Trying to create a cluster using Hazelcast. In case of data backup:
<hazelcast>
<map name="**default**">
<backup-count>1</backup-count>
</map>
</hazelcast>
From the above snippet, just wanted to clarify what does "default" map name stands for? does it mean that all maps will have backup count 1, or the map name "default" will have a backup count of 1.
Upvotes: 0
Views: 761
Reputation: 3150
default
" (not "**default**
") means any map.If you have doubt over this, create a cluster of two nodes, put some data into a Hazelcast map and kill one node. If backup count was 1 for that map, you won't have lost data for that map.
Try
Set<String> iMapNames = this.hazelcastInstance.getDistributedObjects().stream()
.filter(distributedObject -> distributedObject instanceof IMap)
.map(distributedObject -> distributedObject.getName()).collect(Collectors.toCollection(TreeSet::new));
iMapNames.stream().forEach(name -> {
IMap<?, ?> iMap = this.hazelcastInstance.getMap(name);
System.out.printf("IMap: '%s'%n", iMap.getName());
}
Upvotes: 1