hazelcast entry listener on a multinode cluster

假如想象 提交于 2019-12-13 15:24:22

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/14721991/hazelcast-entry-listener-on-a-multinode-cluster

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