[ https://issues.apache.org/jira/browse/GOSSIP-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128890#comment-16128890 ]
Pooya Salehi commented on GOSSIP-38: ------------------------------------ Hi. I checked Hama. I think we need to: * add a name to GossipListener. * keep a list of listeners in GossipMemberStateRefresher * add a register method to GossipMemberStateRefresher * add a register method to GossipManager which calls GossipMemberStateRefresher.register However I still have the following questions: * I don't know what do you mean exactly by Hama allowing async listeners. The listeners get called in the same thread that loops through the list and are not called in a new thread. Although some calculation is done async before calling the listener. We do not have that and we simply need to call the listener. * Should we also add an interest to the listener so they can register to an specific event? * Do you think we need to also add the possibility to unregister a listener? (Hama doesn't have this) > Multiple async GossipListeners > ------------------------------ > > Key: GOSSIP-38 > URL: https://issues.apache.org/jira/browse/GOSSIP-38 > Project: Gossip > Issue Type: New Feature > Reporter: Edward Capriolo > Fix For: 0.1.3 > > > Currently Gossip allows us to specific 0-1 synchronous event listeners. > In Hama: > https://github.com/apache/hama/blob/master/core/src/main/java/org/apache/hama/monitor/fd/NodeEventListener.java > They can attach multiple async listeners. I like this design better unsure if > we should support both or only the async kind. -- This message was sent by Atlassian JIRA (v6.4.14#64029)