|
@@ -230,6 +230,12 @@ document.write("Last Published: " + document.lastModified);
|
|
|
<a href="#ch_zkWatches">ZooKeeper Watches</a>
|
|
|
<ul class="minitoc">
|
|
|
<li>
|
|
|
+<a href="#sc_WatchSemantics">Semantics of Watches</a>
|
|
|
+</li>
|
|
|
+<li>
|
|
|
+<a href="#sc_WatchRemoval">Remove Watches</a>
|
|
|
+</li>
|
|
|
+<li>
|
|
|
<a href="#sc_WatchGuarantees">What ZooKeeper Guarantees about Watches</a>
|
|
|
</li>
|
|
|
<li>
|
|
@@ -452,8 +458,7 @@ document.write("Last Published: " + document.lastModified);
|
|
|
<li>
|
|
|
|
|
|
<p>The following characters are not allowed: \ud800 - uF8FF,
|
|
|
- \uFFF0 - uFFFF, \uXFFFE - \uXFFFF (where X is a digit 1 - E), \uF0000 -
|
|
|
- \uFFFFF.</p>
|
|
|
+ \uFFF0 - uFFFF.</p>
|
|
|
|
|
|
</li>
|
|
|
|
|
@@ -1055,6 +1060,90 @@ document.write("Last Published: " + document.lastModified);
|
|
|
general this all occurs transparently. There is one case where a watch
|
|
|
may be missed: a watch for the existence of a znode not yet created will
|
|
|
be missed if the znode is created and deleted while disconnected.</p>
|
|
|
+<a name="sc_WatchSemantics"></a>
|
|
|
+<h3 class="h4">Semantics of Watches</h3>
|
|
|
+<p> We can set watches with the three calls that read the state of
|
|
|
+ ZooKeeper: exists, getData, and getChildren. The following list details
|
|
|
+ the events that a watch can trigger and the calls that enable them:
|
|
|
+ </p>
|
|
|
+<ul>
|
|
|
+
|
|
|
+<li>
|
|
|
+
|
|
|
+<p>
|
|
|
+<strong>Created event:</strong>
|
|
|
+</p>
|
|
|
+
|
|
|
+<p>Enabled with a call to exists.</p>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+
|
|
|
+<li>
|
|
|
+
|
|
|
+<p>
|
|
|
+<strong>Deleted event:</strong>
|
|
|
+</p>
|
|
|
+
|
|
|
+<p>Enabled with a call to exists, getData, and getChildren.</p>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+
|
|
|
+<li>
|
|
|
+
|
|
|
+<p>
|
|
|
+<strong>Changed event:</strong>
|
|
|
+</p>
|
|
|
+
|
|
|
+<p>Enabled with a call to exists and getData.</p>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+
|
|
|
+<li>
|
|
|
+
|
|
|
+<p>
|
|
|
+<strong>Child event:</strong>
|
|
|
+</p>
|
|
|
+
|
|
|
+<p>Enabled with a call to getChildren.</p>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+</ul>
|
|
|
+<a name="sc_WatchRemoval"></a>
|
|
|
+<h3 class="h4">Remove Watches</h3>
|
|
|
+<p>We can remove the watches registered on a znode with a call to
|
|
|
+ removeWatches. Also, a ZooKeeper client can remove watches locally even
|
|
|
+ if there is no server connection by setting the local flag to true. The
|
|
|
+ following list details the events which will be triggered after the
|
|
|
+ successful watch removal.
|
|
|
+ </p>
|
|
|
+<ul>
|
|
|
+
|
|
|
+<li>
|
|
|
+
|
|
|
+<p>
|
|
|
+<strong>Child Remove event:</strong>
|
|
|
+</p>
|
|
|
+
|
|
|
+<p>Watcher which was added with a call to getChildren.</p>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+
|
|
|
+<li>
|
|
|
+
|
|
|
+<p>
|
|
|
+<strong>Data Remove event:</strong>
|
|
|
+</p>
|
|
|
+
|
|
|
+<p>Watcher which was added with a call to exists or getData.</p>
|
|
|
+
|
|
|
+</li>
|
|
|
+
|
|
|
+</ul>
|
|
|
<a name="sc_WatchGuarantees"></a>
|
|
|
<h3 class="h4">What ZooKeeper Guarantees about Watches</h3>
|
|
|
<p>With regard to watches, ZooKeeper maintains these
|