Github user timothyjward commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/529#discussion_r196102971
--- Diff: src/java/main/org/apache/zookeeper/Watcher.java ---
@@ -84,7 +84,14 @@
* 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),
+
+ /**
+ * The client has been closed. This state is never generated by
+ * the server, but is generated locally when a client calls
+ * {@link ZooKeeper#close()} or {@link ZooKeeper#close(int)}
+ */
+ Closed (-2);
--- End diff --
My understanding was that a negative value would be preferred for an event
which didn't originate from the server, but I don't mind changing it.
---