[jboss-jira] [JBoss JIRA] (JGRP-2067) Protocol: add down(Message) and up(Message)

Bela Ban (JIRA) issues at jboss.org
Mon May 23 07:23:00 EDT 2016


    [ https://issues.jboss.org/browse/JGRP-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241071#comment-13241071 ] 

Bela Ban commented on JGRP-2067:
--------------------------------

We could even get rid of {{Event}} altogether: instead of creating an event, e.g.
{code:java}
View view;
Event evt=new Event(Event.VIEW, view);
down(evt);
{code}
, we could change the {{down()}} and {{up()}} methods to take a type and an argument, e.g.
{code:java}
View view;
down(Event.VIEW, view);
{code}

This is currently not critical though as 99% of all events are messages anyway.

> 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