rados_watch

Register an interest in an object

A watch operation registers the client as being interested in notifications on an object. OSDs keep track of watches on persistent storage, so they are preserved across cluster changes by the normal recovery process. If the client loses its connection to the primary OSD for a watched object, the watch will be removed after 30 seconds. Watches are automatically reestablished when a new connection is made, or a placement group switches OSDs.

@note BUG: watch timeout should be configurable @note BUG: librados should provide a way for watchers to notice connection resets @note BUG: the ver parameter does not work, and -ERANGE will never be returned (See URL tracker.ceph.com/issues/2592)

@param io the pool the object is in @param o the object to watch @param ver expected version of the object @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

extern (C)
int
rados_watch
(,
const(char)* o
,
ulong ver
,
ulong* cookie
,,
void* arg
)

Meta