Sebastian T created ARTEMIS-2610:
------------------------------------
Summary: 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
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)