dlmarion commented on code in PR #5246:
URL: https://github.com/apache/accumulo/pull/5246#discussion_r1913276372


##########
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/ZooCache.java:
##########
@@ -525,6 +526,36 @@ public void clear(String zPath) {
     }
   }
 
+  /**
+   * Removes all paths in the cache match the predicate.
+   */
+  public void clear(Predicate<String> pathPredicate) {
+    Preconditions.checkState(!closed);
+    Predicate<String> pathPredicateToUse;
+    if (log.isTraceEnabled()) {
+      pathPredicateToUse = path -> {
+        boolean testResult = pathPredicate.test(path);
+        if (testResult) {
+          log.trace("removing {} from cache", path);
+        }
+        return testResult;
+      };

Review Comment:
   Added this change in dc5e2c3



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