From: Sage Weil Date: Tue, 18 Nov 2014 23:10:52 +0000 (-0800) Subject: librados: s/handle/cookie/ in headers X-Git-Tag: v0.91~79 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0a6128762d299a246ae7e0c7fb02c56760302fd2;p=ceph.git librados: s/handle/cookie/ in headers Be consistent. Signed-off-by: Sage Weil --- diff --git a/src/include/rados/librados.h b/src/include/rados/librados.h index 0eb50628f473..ccf6a0492430 100644 --- a/src/include/rados/librados.h +++ b/src/include/rados/librados.h @@ -1943,14 +1943,14 @@ typedef void (*rados_watchfailcb_t)(void *arg, * @param io the pool the object is in * @param o the object to watch * @param ver expected version of the object - * @param handle where to store the internal id assigned to this watch + * @param cookie where to store the internal id assigned to this watch * @param watchcb what to do when a notify is received on this object * @param arg application defined data to pass when watchcb is called * @returns 0 on success, negative error code on failure * @returns -ERANGE if the version of the object is greater than ver */ CEPH_RADOS_API int rados_watch(rados_ioctx_t io, const char *o, uint64_t ver, - uint64_t *handle, + uint64_t *cookie, rados_watchcb_t watchcb, void *arg) __attribute__((deprecated)); @@ -1970,14 +1970,14 @@ CEPH_RADOS_API int rados_watch(rados_ioctx_t io, const char *o, uint64_t ver, * * @param io the pool the object is in * @param o the object to watch - * @param handle where to store the internal id assigned to this watch + * @param cookie where to store the internal id assigned to this watch * @param watchcb2 what to do when a notify is received on this object * @param watchfailcb what to do when a notify is not acked in time * @param watcherrcb what to do when the watch session encounters an error * @param arg opaque value to pass to the callback * @returns 0 on success, negative error code on failure */ -CEPH_RADOS_API int rados_watch2(rados_ioctx_t io, const char *o, uint64_t *handle, +CEPH_RADOS_API int rados_watch2(rados_ioctx_t io, const char *o, uint64_t *cookie, rados_watchcb2_t watchcb, rados_watchfailcb_t watchfailcb, rados_watcherrcb_t watcherrcb, @@ -1994,10 +1994,10 @@ CEPH_RADOS_API int rados_watch2(rados_ioctx_t io, const char *o, uint64_t *handl * in the object, a new watch should be created with rados_watch2(). * * @param io the pool the object is in - * @param handle the watch handle + * @param cookie the watch handle * @returns ms since last confirmed on success, negative error code on failure */ -int rados_watch_check(rados_ioctx_t io, uint64_t handle); +int rados_watch_check(rados_ioctx_t io, uint64_t cookie); /** * Unregister an interest in an object @@ -2007,10 +2007,10 @@ int rados_watch_check(rados_ioctx_t io, uint64_t handle); * * @param io the pool the object is in * @param o the name of the watched object (ignored) - * @param handle which watch to unregister + * @param cookie which watch to unregister * @returns 0 on success, negative error code on failure */ -CEPH_RADOS_API int rados_unwatch(rados_ioctx_t io, const char *o, uint64_t handle) +CEPH_RADOS_API int rados_unwatch(rados_ioctx_t io, const char *o, uint64_t cookie) __attribute__((deprecated)); /** @@ -2020,10 +2020,10 @@ CEPH_RADOS_API int rados_unwatch(rados_ioctx_t io, const char *o, uint64_t handl * watch. This should be called to clean up unneeded watchers. * * @param io the pool the object is in - * @param handle which watch to unregister + * @param cookie which watch to unregister * @returns 0 on success, negative error code on failure */ -CEPH_RADOS_API int rados_unwatch2(rados_ioctx_t io, uint64_t handle); +CEPH_RADOS_API int rados_unwatch2(rados_ioctx_t io, uint64_t cookie); /** * Sychronously notify watchers of an object @@ -2100,13 +2100,13 @@ int rados_notify2(rados_ioctx_t io, const char *o, const char *buf, int buf_len, * @param io the pool the object is in * @param o the name of the object * @param notify_id the notify_id we got on the watchcb2_t callback - * @param handle the watcher handle + * @param cookie the watcher handle * @param buf payload to return to notifier (optional) * @param buf_len payload length * @returns 0 on success */ int rados_notify_ack(rados_ioctx_t io, const char *o, - uint64_t notify_id, uint64_t handle, + uint64_t notify_id, uint64_t cookie, const char *buf, int buf_len); diff --git a/src/include/rados/librados.hpp b/src/include/rados/librados.hpp index f32c36e92c74..235479e00f05 100644 --- a/src/include/rados/librados.hpp +++ b/src/include/rados/librados.hpp @@ -974,7 +974,7 @@ namespace librados /// acknowledge a notify we received. void notify_ack(const std::string& o, ///< watched object uint64_t notify_id, ///< notify id - uint64_t handle, ///< our watch handle + uint64_t cookie, ///< our watch handle bufferlist& bl); ///< optional reply payload /*** @@ -988,17 +988,17 @@ namespace librados * be destroyed with unwatch(). The the user is still interested * in the object, a new watch should be created with watch(). * - * @param handle watch handle + * @param cookie watch handle * @returns ms since last confirmed valid, or error */ - int watch_check(uint64_t handle); + int watch_check(uint64_t cookie); // old, deprecated versions - int watch(const std::string& o, uint64_t ver, uint64_t *handle, + int watch(const std::string& o, uint64_t ver, uint64_t *cookie, librados::WatchCtx *ctx) __attribute__ ((deprecated)); int notify(const std::string& o, uint64_t ver, bufferlist& bl) __attribute__ ((deprecated)); - int unwatch(const std::string& o, uint64_t handle) + int unwatch(const std::string& o, uint64_t cookie) __attribute__ ((deprecated)); /**