Browse Source

ZOOKEEPER-265. remove (deprecate) unused NoSyncConnected from KeeperState. (phunt via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@732826 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 16 years ago
parent
commit
5de5a6e613
2 changed files with 22 additions and 1 deletions
  1. 4 1
      CHANGES.txt
  2. 18 0
      src/java/main/org/apache/zookeeper/Watcher.java

+ 4 - 1
CHANGES.txt

@@ -62,7 +62,10 @@ BUGFIXES:
 
   ZOOKEEPER-250. isvalidsnapshot should handle the case of 0 snapshot
   files better. (mahadev via phunt)
-  
+ 
+  ZOOKEEPER-265. remove (deprecate) unused NoSyncConnected from KeeperState.
+(phunt via mahadev)
+ 
 IMPROVEMENTS:
    
   ZOOKEEPER-64. Log system env information when initializing server and

+ 18 - 0
src/java/main/org/apache/zookeeper/Watcher.java

@@ -36,10 +36,28 @@ public interface Watcher {
          * Enumeration of states the ZooKeeper may be at the event
          */
         public enum KeeperState {
+            /** Unused, this state is never generated by the server */
+            @Deprecated
             Unknown (-1),
+
+            /** The client is in the disconnected state - it is not connected
+             * to any server in the ensemble. */
             Disconnected (0),
+
+            /** Unused, this state is never generated by the server */
+            @Deprecated
             NoSyncConnected (1),
+
+            /** The client is in the connected state - it is connected
+             * to a server in the ensemble (one of the servers specified
+             * in the host connection parameter during ZooKeeper client
+             * creation). */
             SyncConnected (3),
+
+            /** The serving cluster has expired this session. The ZooKeeper
+             * client connection (the session) is no longer valid. You must
+             * create a new client connection (instantiate a new ZooKeeper
+             * instance) if you with to access the ensemble. */
             Expired (-112);
 
             private final int intValue;     // Integer representation of value