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

ASF subversion and git services commented on ARTEMIS-2610:
----------------------------------------------------------

Commit cfa11bbadc577acc386a274c4c888a1d3c5a3c02 in activemq-artemis's branch 
refs/heads/master from sebthom
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=cfa11bb ]

ARTEMIS-2610 Improve ActiveMQServer.getConnectionCount()

> Improve ActiveMQServer.getConnectionCount()
> -------------------------------------------
>
>                 Key: ARTEMIS-2610
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2610
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.11.0
>            Reporter: Sebastian T
>            Priority: Minor
>              Labels: performance
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We are using ActiveMQServer.getConnectionCount() as one metric to constantly 
> monitor our brokers via JMX.
> {{ActiveMQServer.getConnectionCount()}} currently invokes 
> {{remotingService.getConnections().size()}} to determine the connection size. 
> This is unnecessarily expensive as {{remotingService.getConnections()}} is 
> synchronized and returns a new {{Set<RemotingConnection>}} instance with all 
> connections on each invocation.
> This PR introduces a new method {{RemotingService.getConnectionCount()}} 
> which avoids the synchronization and temporary object creation.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to