curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject curator git commit: doc
Date Sun, 23 Aug 2015 15:57:54 GMT
Repository: curator
Updated Branches:
  refs/heads/CURATOR-247 1a2a94b62 -> 64d966c18


doc


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

Branch: refs/heads/CURATOR-247
Commit: 64d966c18b9d18c40e13fda98e52d9253b281086
Parents: 1a2a94b
Author: randgalt <randgalt@apache.org>
Authored: Sun Aug 23 10:57:48 2015 -0500
Committer: randgalt <randgalt@apache.org>
Committed: Sun Aug 23 10:57:48 2015 -0500

----------------------------------------------------------------------
 .../ClassicConnectionHandlingPolicy.java        |  3 +++
 .../connection/ConnectionHandlingPolicy.java    | 20 ++++++++++++++------
 .../StandardConnectionHandlingPolicy.java       |  5 +++++
 3 files changed, 22 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/64d966c1/curator-client/src/main/java/org/apache/curator/connection/ClassicConnectionHandlingPolicy.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/connection/ClassicConnectionHandlingPolicy.java
b/curator-client/src/main/java/org/apache/curator/connection/ClassicConnectionHandlingPolicy.java
index d0db0bb..1d53728 100644
--- a/curator-client/src/main/java/org/apache/curator/connection/ClassicConnectionHandlingPolicy.java
+++ b/curator-client/src/main/java/org/apache/curator/connection/ClassicConnectionHandlingPolicy.java
@@ -4,6 +4,9 @@ import org.apache.curator.CuratorZookeeperClient;
 import org.apache.curator.RetryLoop;
 import java.util.concurrent.Callable;
 
+/**
+ * Emulates the pre 3.0.0 Curator connection handling
+ */
 public class ClassicConnectionHandlingPolicy implements ConnectionHandlingPolicy
 {
     @Override

http://git-wip-us.apache.org/repos/asf/curator/blob/64d966c1/curator-client/src/main/java/org/apache/curator/connection/ConnectionHandlingPolicy.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/connection/ConnectionHandlingPolicy.java
b/curator-client/src/main/java/org/apache/curator/connection/ConnectionHandlingPolicy.java
index 51bdccc..6cea67d 100644
--- a/curator-client/src/main/java/org/apache/curator/connection/ConnectionHandlingPolicy.java
+++ b/curator-client/src/main/java/org/apache/curator/connection/ConnectionHandlingPolicy.java
@@ -1,8 +1,13 @@
 package org.apache.curator.connection;
 
 import org.apache.curator.CuratorZookeeperClient;
+import org.apache.curator.RetryLoop;
 import java.util.concurrent.Callable;
 
+/**
+ * Abstracts connection handling so that Curator can emulate it's old, pre 3.0.0
+ * handling and update to newer handling.
+ */
 public interface ConnectionHandlingPolicy
 {
     /**
@@ -12,6 +17,15 @@ public interface ConnectionHandlingPolicy
      */
     boolean isEmulatingClassicHandling();
 
+    /**
+     * Called by {@link RetryLoop#callWithRetry(CuratorZookeeperClient, Callable)} to do
the work
+     * of retrying
+     *
+     * @param client client
+     * @param proc the procedure to retry
+     * @return result
+     * @throws Exception errors
+     */
     <T> T callWithRetry(CuratorZookeeperClient client, Callable<T> proc) throws
Exception;
 
     enum CheckTimeoutsResult
@@ -55,10 +69,4 @@ public interface ConnectionHandlingPolicy
      * @throws Exception errors
      */
     CheckTimeoutsResult checkTimeouts(Callable<Boolean> hasNewConnectionString, long
connectionStartMs, int sessionTimeoutMs, int connectionTimeoutMs) throws Exception;
-
-/*
-    int getDefaultConnectionTimeoutMs();
-
-    int getDefaultSessionTimeoutMs();
-*/
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/64d966c1/curator-client/src/main/java/org/apache/curator/connection/StandardConnectionHandlingPolicy.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/connection/StandardConnectionHandlingPolicy.java
b/curator-client/src/main/java/org/apache/curator/connection/StandardConnectionHandlingPolicy.java
index b16cd53..6906284 100644
--- a/curator-client/src/main/java/org/apache/curator/connection/StandardConnectionHandlingPolicy.java
+++ b/curator-client/src/main/java/org/apache/curator/connection/StandardConnectionHandlingPolicy.java
@@ -6,6 +6,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import java.util.concurrent.Callable;
 
+/**
+ * Curator's standard connection handling since 3.0.0
+ *
+ * @since 3.0.0
+ */
 public class StandardConnectionHandlingPolicy implements ConnectionHandlingPolicy
 {
     private final Logger log = LoggerFactory.getLogger(getClass());


Mime
View raw message