gianm commented on code in PR #18200:
URL: https://github.com/apache/druid/pull/18200#discussion_r2188646937


##########
server/src/main/java/org/apache/druid/client/ServerView.java:
##########
@@ -29,7 +29,7 @@
  */
 public interface ServerView
 {
-  void registerServerRemovedCallback(Executor exec, ServerRemovedCallback 
callback);
+  void registerServerCallback(Executor exec, ServerCallback callback);

Review Comment:
   A builder might be nice too. It would allow keeping together all the 
`ServerCallback` stuff in the interface. Something like:
   
   ```java
   ServerCallback.builder()
                 .onServerAdded(server -> ...)
                 .onServerRemoved(server -> ...)
                 .build()
   ```
   
   or for just doing one:
   
   ```java
   ServerCallback.onServerRemoved(server -> ...)
   ```
   
   etc.
   
   Would like to have this be a different PR, so that PR can focus on the 
thinking about the best way to specify callbacks that only want to listen to 
one thing.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to