CURATOR-129 Add docs to PCC constructors Add javadocs cautioning users that ExecutorServices provided should be single-threaded
This closes #86 Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/40b458ee Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/40b458ee Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/40b458ee Branch: refs/heads/CURATOR-3.0 Commit: 40b458ee11391e74a2d7948c380b869e9b000f20 Parents: 3a4d541 Author: Mike Drob <[email protected]> Authored: Wed Jun 24 14:13:41 2015 -0500 Committer: Mike Drob <[email protected]> Committed: Fri Aug 7 14:03:03 2015 -0500 ---------------------------------------------------------------------- .../curator/framework/recipes/cache/PathChildrenCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/40b458ee/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java ---------------------------------------------------------------------- diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java index 5a7b424..b5d912c 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java @@ -199,7 +199,7 @@ public class PathChildrenCache implements Closeable * @param path path to watch * @param cacheData if true, node contents are cached in addition to the stat * @param dataIsCompressed if true, data in the path is compressed - * @param executorService ExecutorService to use for the PathChildrenCache's background thread + * @param executorService ExecutorService to use for the PathChildrenCache's background thread. This service should be single threaded, otherwise the cache may see inconsistent results. */ public PathChildrenCache(CuratorFramework client, String path, boolean cacheData, boolean dataIsCompressed, final ExecutorService executorService) { @@ -211,7 +211,7 @@ public class PathChildrenCache implements Closeable * @param path path to watch * @param cacheData if true, node contents are cached in addition to the stat * @param dataIsCompressed if true, data in the path is compressed - * @param executorService Closeable ExecutorService to use for the PathChildrenCache's background thread + * @param executorService Closeable ExecutorService to use for the PathChildrenCache's background thread. This service should be single threaded, otherwise the cache may see inconsistent results. */ public PathChildrenCache(CuratorFramework client, String path, boolean cacheData, boolean dataIsCompressed, final CloseableExecutorService executorService) {
