1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_LIBRBD_WATCHER_REWATCH_REQUEST_H
5 #define CEPH_LIBRBD_WATCHER_REWATCH_REQUEST_H
7 #include "include/int_types.h"
8 #include "include/rados/librados.hpp"
17 class RewatchRequest {
20 static RewatchRequest *create(librados::IoCtx& ioctx, const std::string& oid,
22 librados::WatchCtx2 *watch_ctx,
23 uint64_t *watch_handle, Context *on_finish) {
24 return new RewatchRequest(ioctx, oid, watch_lock, watch_ctx, watch_handle,
28 RewatchRequest(librados::IoCtx& ioctx, const std::string& oid,
29 RWLock &watch_lock, librados::WatchCtx2 *watch_ctx,
30 uint64_t *watch_handle, Context *on_finish);
44 * | . . (recoverable error)
54 librados::IoCtx& m_ioctx;
57 librados::WatchCtx2 *m_watch_ctx;
58 uint64_t *m_watch_handle;
61 uint64_t m_rewatch_handle = 0;
64 void handle_unwatch(int r);
67 void handle_rewatch(int r);
72 } // namespace watcher
75 #endif // CEPH_LIBRBD_WATCHER_REWATCH_REQUEST_H