pkuwm commented on a change in pull request #644: Customize IZkStateListener to
add handleNewSession(sessionId)
URL: https://github.com/apache/helix/pull/644#discussion_r354641768
##########
File path:
helix-core/src/main/java/org/apache/helix/manager/zk/client/HelixZkClient.java
##########
@@ -35,8 +36,70 @@
void unsubscribeDataChanges(String path, IZkDataListener listener);
+ /* TODO: remove below default implementation when getting rid of I0Itec in
the new zk client. */
+ default void subscribeStateChanges(
+ final org.apache.helix.manager.zk.zookeeper.IZkStateListener listener) {
+ subscribeStateChanges(new IZkStateListener() {
Review comment:
I thought about it. There are tradeoffs.
I don't think we can define a different private class for this
IZkStateListener implementation. But we could have a method to provide this
implementation. The downside is, we need to define this method like
`static IZkStateListener createDefaultIZkStateListener(listener)`
which is not private. We could not put a **private** modifier in this
**public** interface.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]