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

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

Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2439#discussion_r235525451
  
    --- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
 ---
    @@ -950,6 +950,24 @@ public String updateQueue(String name,
           }
        }
     
    +   @Override
    +   public String[] getClusterConnectionNames() {
    +      checkStarted();
    +
    +      clearIO();
    +      try {
    +         List<String> names = new ArrayList<>();
    --- End diff --
    
    using java 8 lambda's could be
    
    ``` 
            return 
server.getClusterManager().getClusterConnections().stream().map(ClusterConnection::getName).toArray(String[]::new);
    ```



> Add management method to get cluster-connection names
> -----------------------------------------------------
>
>                 Key: ARTEMIS-2179
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2179
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>
> To invoke management operations on many resources (e.g. queues, addresses, 
> bridges, diverts, cluster-connections, etc.) you need to know the _name_ of 
> the resource. Many of these resource types have management methods to get 
> their names (e.g. {{ActiveMQServerControl}} has {{getQueueNames()}}, 
> {{getAddressNames()}}, {{getDivertNames()}}, {{getBridgeNames}}, etc.).  
> However, cluster-connections do not have such a management method.



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

Reply via email to