ctubbsii commented on code in PR #5256:
URL: https://github.com/apache/accumulo/pull/5256#discussion_r1924435205


##########
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/ZooCache.java:
##########
@@ -46,30 +52,44 @@
 import org.slf4j.LoggerFactory;
 
 import com.github.benmanes.caffeine.cache.Cache;
-import com.github.benmanes.caffeine.cache.RemovalListener;
+import com.github.benmanes.caffeine.cache.Ticker;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 
 /**
  * A cache for values stored in ZooKeeper. Values are kept up to date as they 
change.
  */
-public class ZooCache {
+public class ZooCache implements Watcher {

Review Comment:
   plus, it already does contain a watcher... and a set of external watchers. 
In this case, it doesn't even have to be a Watcher. Just like the 
ZooCacheWatcher, which used to be a Watcher, but is now a 
`Consumer<WatchedEvent>`, this session observer shouldn't reuse the ZooKeeper 
Watcher interface for things that aren't given directly to ZooKeeper as a 
Watcher there. That makes it hard to figure out which are actual ZooKeeper 
watchers and which are just reusing the interface but aren't actually ZooKeeper 
watchers.



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

Reply via email to