<divclass="headertitle"><divclass="title">KeyValue store watcher<divclass="ingroups"><aclass="el"href="group__func_group.html">Functions</a>»<aclass="el"href="group__kv_group.html">KeyValue store</a></div></div></div>
<trclass="memdesc:ga562c216a0199c30455af4c2da46000e5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the next entry for this watcher. <br/></td></tr>
<p>These functions allow to receive updates for key(s) on a given bucket.</p>
<dlclass="section warning"><dt>Warning</dt><dd>EXPERIMENTAL FEATURE! We reserve the right to change the API without necessarily bumping the major version of the library. </dd></dl>
<p>Returns the next entry for this watcher. The entry may be <code>NULL</code> (with <aclass="el"href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990"title="Success.">NATS_OK</a> status) to indicate that the initial state has been retrieved.</p>
<p>If a thread is waiting on this call, it can be canceled with a call to <aclass="el"href="group__kv_watcher.html#ga73adf44114fedd62ef75ebd81839b65e"title="Stops the watcher.">kvWatcher_Stop</a>.</p>
<dlclass="section note"><dt>Note</dt><dd>The entry should be destroyed to release memory using <aclass="el"href="group__kv_entry.html#ga8359ffcdeefb9c5821e6442d0d5ee388"title="Destroys the KeyValue entry object.">kvEntry_Destroy</a>.</dd></dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">new_entry</td><td>the location where to store the pointer to the <aclass="el"href="group__types_group.html#gad489fb4074f27427560ca71797db6191">kvEntry</a> object. </td></tr>
<tr><tdclass="paramname">w</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
<tr><tdclass="paramname">timeout</td><td>how long to wait (in milliseconds) for the next entry. </td></tr>
<p>Stops the watcher. Stopping a stopped watcher returns <aclass="el"href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9cee6c417868ecaa69f99ff4f6576990"title="Success.">NATS_OK</a>.</p>
<p>After this call, new and existing calls to <aclass="el"href="group__kv_watcher.html#ga562c216a0199c30455af4c2da46000e5"title="Returns the next entry for this watcher.">kvWatcher_Next</a> (that are waiting for an update) will return with <aclass="el"href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a9bb78b4f245d2870040d25c450febd4b">NATS_ILLEGAL_STATE</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">w</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
<p>Releases memory allocated for this <aclass="el"href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">w</td><td>the pointer to the <aclass="el"href="group__types_group.html#ga526fa6d37e818784b94cdc1713f3a043">kvWatcher</a> object. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->
<ul>
<liclass="footer">NATS.IO Supported By Synadia Communications Inc.