Github user dragonsinth commented on a diff in the pull request:
https://github.com/apache/curator/pull/278#discussion_r219688441
--- Diff:
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java
---
@@ -165,6 +167,18 @@ public Builder setCreateParentNodes(boolean
createParentNodes)
return this;
}
+ /**
+ * By default, TreeCache creates {@link
org.apache.zookeeper.ZooKeeper} watches for every created path.
+ * Change this behavior with this method.
+ * @param createZkWatches true to create watches
+ * @return this for chaining
+ */
+ public Builder setCreateZkWatches(boolean createZkWatches)
+ {
+ this.createZkWatches = createZkWatches;
+ return this;
+ }
--- End diff --
and e.g. disableZkWatches(boolean)
---