noblepaul commented on pull request #1694:
URL: https://github.com/apache/lucene-solr/pull/1694#issuecomment-664244951


   >I’d think an instance of the abstraction should be returned instead,
   
   I though about it and decided against it. We should always try to keep the 
methods light and avoid creating unnecessary Objects.
   for instance, the `Shard#leader()` returns the name of the leader replica. A 
String is lightweight object and we do not need to create a `ShardReplica` 
object unnecessarily.
   
   > I see two cases where we need interfaces such as defined here:
   
   Both. over time , we will move as much of our code to use these interfaces 
instead of concrete classes.
   
   I do not see a reason why external plugins cannot use these interfaces. This 
is not to say that external plugins may need some more methods. In that case, 
just compose your own interfaces using these as building blocks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to