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

ASF GitHub Bot commented on SOLR-8323:
--------------------------------------

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

    https://github.com/apache/lucene-solr/pull/32#discussion_r61507961
  
    --- Diff: 
solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java ---
    @@ -131,6 +132,19 @@
     
       private final Runnable securityNodeListener;
     
    +  private Map<String, CollectionWatch> collectionWatches = new 
ConcurrentHashMap<>();
    --- End diff --
    
    The reason I made a comment about using the concrete type here is that it 
makes it much easier to work with as a developer.  When you can see that the 
static type of this variable is ConcurrentHashMap, that helps you evaluate the 
code that touches it.
    
    For example, when you use IDE features to 'click through' a method call or 
view the javadoc on a called method, you get the ConcurrentHashMap version of 
the javadoc/method instead of the Map version, which helps you more easily 
evaluate the correctness.


> Add CollectionWatcher API to ZkStateReader
> ------------------------------------------
>
>                 Key: SOLR-8323
>                 URL: https://issues.apache.org/jira/browse/SOLR-8323
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: master
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>         Attachments: SOLR-8323.patch, SOLR-8323.patch, SOLR-8323.patch, 
> SOLR-8323.patch
>
>
> An API to watch for changes to collection state would be a generally useful 
> thing, both internally and for client use.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to