activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-1606) Change AddressInfo RoutingType Set to use EnumSet
Date Thu, 18 Jan 2018 08:41:00 GMT

    [ https://issues.apache.org/jira/browse/ARTEMIS-1606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330239#comment-16330239
] 

ASF GitHub Bot commented on ARTEMIS-1606:
-----------------------------------------

Github user michaelandrepearce commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1777
  
    @franz1981 i was waiting on you, to give a thumbs up before i merged, is that a thumbs
up?


> Change AddressInfo RoutingType Set to use EnumSet 
> --------------------------------------------------
>
>                 Key: ARTEMIS-1606
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1606
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Michael Andre Pearce
>            Priority: Major
>
> RoutingType is a enum, as such can take advantage of the benefits of EnumSet. Its a specialist
set designed for Enum's.
> https://docs.oracle.com/javase/7/docs/api/java/util/EnumSet.html
> https://www.techempower.com/blog/2017/02/14/enumset-and-enummap/
> This will reduce memory footprint due to being many times more compact, this is particularly
important as this Address Info and Routing Type sets are in the hot path of message flow.
And that there is only two routing types currently so a very small enum.
> Also at the same time to remove the iterator from the getRoutingType which is in the
hotpath. Like wise we can avoid it if AddressInfo is constructed with a single RoutingType.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message