You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2017/10/04 14:02:06 UTC
[6/8] curator git commit: doc updates
doc updates
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/9c1186be
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/9c1186be
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/9c1186be
Branch: refs/heads/persistent-watch
Commit: 9c1186bebbbb5f65f18c942824e85051bddf8c19
Parents: 02073a7
Author: randgalt <ra...@apache.org>
Authored: Sun Aug 27 19:21:16 2017 +0200
Committer: randgalt <ra...@apache.org>
Committed: Sun Aug 27 19:21:16 2017 +0200
----------------------------------------------------------------------
.../apache/curator/framework/recipes/cache/TreeCache.java | 9 ++++++++-
.../curator/framework/recipes/cache/TreeCacheBridge.java | 4 ++--
2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/9c1186be/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java
index 4e663cd..b411220 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java
@@ -73,7 +73,9 @@ import static org.apache.curator.utils.PathUtils.validatePath;
* be prepared for false-positives and false-negatives. Additionally, always use the version number
* when updating data to avoid overwriting another process' change.</p>
*
- * @deprecated use {@link CuratorCache}
+ * @deprecated use {@link CuratorCache} - to help in upgrading from old code, you can
+ * use {@link org.apache.curator.framework.recipes.cache.TreeCache.Builder#buildBridge()} to build an instance
+ * that roughly matches the TreeCache API but is backed by a CuratorCache
*/
@Deprecated
public class TreeCache implements TreeCacheBridge
@@ -112,6 +114,11 @@ public class TreeCache implements TreeCacheBridge
return new TreeCache(client, path, cacheData, dataIsCompressed, maxDepth, executor, createParentNodes, selector);
}
+ /**
+ * Builds a TreeCacheBridge instance backed by {@link org.apache.curator.framework.recipes.watch.CuratorCache}
+ *
+ * @return instance
+ */
public TreeCacheBridge buildBridge()
{
CuratorCacheBuilder builder = CuratorCacheBuilder.builder(client, path);
http://git-wip-us.apache.org/repos/asf/curator/blob/9c1186be/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCacheBridge.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCacheBridge.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCacheBridge.java
index 9c383af..8b6f37a 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCacheBridge.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCacheBridge.java
@@ -30,10 +30,10 @@ public interface TreeCacheBridge extends Closeable
/**
* Return the current set of children at the given path, mapped by child name. There are no
* guarantees of accuracy; this is merely the most recent view of the data. If there is no
- * node at this path, {@code null} is returned.
+ * node at this path, an empty list or {@code null} is returned (depending on implementation).
*
* @param fullPath full path to the node to check
- * @return a possibly-empty list of children if the node is alive, or null
+ * @return a possibly-empty list of children if the node is alive, or null (depending on implementation)
*/
Map<String, ChildData> getCurrentChildren(String fullPath);