Reputation: 20182
I have a multi-node hazelcast cluster. I need to ensure that when a new value is inserted into a map, only one entrylistener/map store gets invoked. Unless I am having a brain freeze, hazelcast does not do that by default (It would be great if I was wrong about this). Besides using distributed locks (I do not wish to avoid using listeners/map stores on other nodes), are there any other suggestions to ensure that only one listener/map store ends up executing code.
Thanks
Upvotes: 2
Views: 2702
Reputation: 3133
After a put only the node owns the key executes the map store operation. After a put only the ones which have added itself as listener to a map will receive event.
Upvotes: 3