rabashizade commented on code in PR #2082:
URL: https://github.com/apache/helix/pull/2082#discussion_r869454573
##########
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/callback/ZkAsyncCallbacks.java:
##########
@@ -111,12 +112,17 @@ protected void recordFailure(int rc, String path,
ZkAsyncCallMonitorContext moni
}
}
- public static class CreateCallbackHandler extends DefaultCallback implements
StringCallback {
+ public static class CreateCallbackHandler extends DefaultCallback implements
StringCallback, Create2Callback {
Review Comment:
The reason is the callback type in Zookeeper which supports TTL mode is of
type `Create2Callback` (see
[here](https://github.com/apache/zookeeper/blob/master/zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java#L1602)).
So I either had to add another `CallbackHandler` type that implements
`Create2Callback`, or add `Create2Callback` to `CreateCallbackHandler` to
support async create operations with TTL support. Adding a new type resulted in
more duplicate code of the same methods with different argument types
downstream, so I decided to just have `CreateCallbackHandler` implement
`Create2Callback` instead.
--
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]