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 2015/08/24 19:32:09 UTC

[2/3] curator git commit: doc

doc


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/2e1e92e1
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/2e1e92e1
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/2e1e92e1

Branch: refs/heads/CURATOR-248
Commit: 2e1e92e162ef812a9d076695500f0bda8b15b6c5
Parents: 45df7ba
Author: randgalt <ra...@apache.org>
Authored: Mon Aug 24 12:30:33 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Mon Aug 24 12:30:33 2015 -0500

----------------------------------------------------------------------
 src/site/confluence/errors.confluence | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/2e1e92e1/src/site/confluence/errors.confluence
----------------------------------------------------------------------
diff --git a/src/site/confluence/errors.confluence b/src/site/confluence/errors.confluence
index 28805e0..c9545ac 100644
--- a/src/site/confluence/errors.confluence
+++ b/src/site/confluence/errors.confluence
@@ -31,5 +31,12 @@ appropriate action. These are the possible state changes:
 {{UnhandledErrorListener}} is called when a background task, etc. catches an exception. In general, Curator users shouldn't care
 about these as they are logged. However, you can listen for them if you choose.
 
+h2. Error Policy
+
+Curator has a pluggable error policy. The default policy takes the conservative approach of treating connection states SUSPENDED and LOST the same way.
+i.e. when a recipe sees the state change to SUSPENDED it will assume that the ZooKeeper session is lost and will clean up any watchers, nodes, etc. You can choose,
+however, a more aggressive approach by setting the error policy to only treat LOST (i.e. true session loss) as an error state. Do this in the CuratorFrameworkFactory via:
+{{errorPolicy(new SessionErrorPolicy())}}.
+
 h2. Recipes
 In general, the recipes attempt to deal with errors and connection issues. See the doc for each recipe for details on how it deals with errors.