rename property
authorEnrico Olivelli <eolivelli@apache.org>
Sun, 24 Jun 2018 16:14:23 +0000 (18:14 +0200)
committerEnrico Olivelli <eolivelli@apache.org>
Sun, 24 Jun 2018 16:14:23 +0000 (18:14 +0200)
curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java
curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java
curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java

index 065743b..1981c90 100644 (file)
@@ -52,7 +52,7 @@ public class CuratorZookeeperClient implements Closeable
     private final ConnectionState state;
     private final AtomicReference<RetryPolicy> retryPolicy = new AtomicReference<RetryPolicy>();
     private final int connectionTimeoutMs;
-    private final int defaultWaitForShutdownTimeoutMs;
+    private final int waitForShutdownTimeoutMs;
     private final AtomicBoolean started = new AtomicBoolean(false);
     private final AtomicReference<TracerDriver> tracer = new AtomicReference<TracerDriver>(new DefaultTracerDriver());
     private final ConnectionHandlingPolicy connectionHandlingPolicy;
@@ -146,7 +146,7 @@ public class CuratorZookeeperClient implements Closeable
         ensembleProvider = Preconditions.checkNotNull(ensembleProvider, "ensembleProvider cannot be null");
 
         this.connectionTimeoutMs = connectionTimeoutMs;
-        this.defaultWaitForShutdownTimeoutMs = defaultWaitForShutdownTimeoutMs;
+        this.waitForShutdownTimeoutMs = defaultWaitForShutdownTimeoutMs;
         state = new ConnectionState(zookeeperFactory, ensembleProvider, sessionTimeoutMs, connectionTimeoutMs, watcher, tracer, canBeReadOnly, connectionHandlingPolicy);
         setRetryPolicy(retryPolicy);
     }
@@ -240,13 +240,13 @@ public class CuratorZookeeperClient implements Closeable
     /**
      * Close the client.
      *
-     * Same as {@link #close(int) } using the default timeout set at construction time.
+     * Same as {@link #close(int) } using the timeout set at construction time.
      *
      * @see #close(int)
      */
     @Override
     public void close() {
-        close(defaultWaitForShutdownTimeoutMs);
+        close(waitForShutdownTimeoutMs);
     }
             
     /**
index dad164e..c1615c5 100644 (file)
@@ -148,7 +148,7 @@ public class CuratorFrameworkFactory
         private ConnectionHandlingPolicy connectionHandlingPolicy = new StandardConnectionHandlingPolicy();
         private SchemaSet schemaSet = SchemaSet.getDefaultSchemaSet();
         private boolean zk34CompatibilityMode = isZK34();
-        private int defaultWaitForShutdownTimeoutMs = 0;
+        private int waitForShutdownTimeoutMs = 0;
         /**
          * Apply the current values and build a new CuratorFramework
          *
@@ -412,7 +412,7 @@ public class CuratorFrameworkFactory
          */
         public Builder defaultWaitForShutdownTimeoutMs(int defaultWaitForShutdownTimeoutMs)
         {
-            this.defaultWaitForShutdownTimeoutMs = defaultWaitForShutdownTimeoutMs;
+            this.waitForShutdownTimeoutMs = defaultWaitForShutdownTimeoutMs;
             return this;
         }
 
@@ -509,9 +509,9 @@ public class CuratorFrameworkFactory
             return connectionTimeoutMs;
         }
 
-        public int getDefaultWaitForShutdownTimeoutMs()
+        public int getWaitForShutdownTimeoutMs()
         {
-            return defaultWaitForShutdownTimeoutMs;
+            return waitForShutdownTimeoutMs;
         }
 
         public int getMaxCloseWaitMs()
index 80a7b56..63809ff 100644 (file)
@@ -122,7 +122,7 @@ public class CuratorFrameworkImpl implements CuratorFramework
                 builder.getEnsembleProvider(),
                 builder.getSessionTimeoutMs(),
                 builder.getConnectionTimeoutMs(),
-                builder.getDefaultWaitForShutdownTimeoutMs(),
+                builder.getWaitForShutdownTimeoutMs(),
                 new Watcher()
                 {
                     @Override