[jboss-jira] [JBoss JIRA] (JGRP-2067) Protocol: add down(Message) and up(Message)
Bela Ban (JIRA)
issues at jboss.org
Mon May 23 07:30:00 EDT 2016
[ https://issues.jboss.org/browse/JGRP-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241075#comment-13241075 ]
Bela Ban commented on JGRP-2067:
--------------------------------
To really force all protocols to implement these new callbacks, {{Event.MSG}} would have to be removed!
> Protocol: add down(Message) and up(Message)
> -------------------------------------------
>
> Key: JGRP-2067
> URL: https://issues.jboss.org/browse/JGRP-2067
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 4.0
>
>
> Oftentime we have code like this, e.g. in a protocol:
> {code:java}
> void send(Message msg) {
> ...
> down_prot.down(new Event(Event.MSG, msg));
> }
> {code}
> Most protocols deal mainly with {{Message}} types, so adding {{down(Message msg)}} and {{up(Message msg)}} would simplify the code above to:
> {code:java}
> void send(Message msg) {
> ...
> down_prot.down(msg);
> }
> {code}
> This would also lead to a (massive) reduction of {{Event}} class creations.
> Downside: this requires a lot of code changes (mainly in protocols)!
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list