|
@@ -36,10 +36,28 @@ public interface Watcher {
|
|
* Enumeration of states the ZooKeeper may be at the event
|
|
* Enumeration of states the ZooKeeper may be at the event
|
|
*/
|
|
*/
|
|
public enum KeeperState {
|
|
public enum KeeperState {
|
|
|
|
+ /** Unused, this state is never generated by the server */
|
|
|
|
+ @Deprecated
|
|
Unknown (-1),
|
|
Unknown (-1),
|
|
|
|
+
|
|
|
|
+ /** The client is in the disconnected state - it is not connected
|
|
|
|
+ * to any server in the ensemble. */
|
|
Disconnected (0),
|
|
Disconnected (0),
|
|
|
|
+
|
|
|
|
+ /** Unused, this state is never generated by the server */
|
|
|
|
+ @Deprecated
|
|
NoSyncConnected (1),
|
|
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),
|
|
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);
|
|
Expired (-112);
|
|
|
|
|
|
private final int intValue; // Integer representation of value
|
|
private final int intValue; // Integer representation of value
|