summaryrefslogtreecommitdiffstats
path: root/src/rgw/services/svc_notify.h
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@redhat.com>2018-09-06 13:00:31 +0200
committerYehuda Sadeh <yehuda@redhat.com>2018-11-08 18:19:29 +0100
commit91601cf98a2e6b2b2920ffa5add85f77dd42f9b0 (patch)
treee650aa3f26a769e57532dbe26445bcb0c5ed063a /src/rgw/services/svc_notify.h
parentrgw: svc_cache: more work (diff)
downloadceph-91601cf98a2e6b2b2920ffa5add85f77dd42f9b0.tar.xz
ceph-91601cf98a2e6b2b2920ffa5add85f77dd42f9b0.zip
rgw: svc_finisher: create service
and other fixes Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Diffstat (limited to 'src/rgw/services/svc_notify.h')
-rw-r--r--src/rgw/services/svc_notify.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/rgw/services/svc_notify.h b/src/rgw/services/svc_notify.h
index 36adefa7168..bcd96a8f4d9 100644
--- a/src/rgw/services/svc_notify.h
+++ b/src/rgw/services/svc_notify.h
@@ -8,24 +8,32 @@
class RGWSI_Zone;
+class RGWSI_Finisher;
class RGWWatcher;
class RGWS_Notify : public RGWService
{
public:
- RGWS_Notify(CephContext *cct) : RGWService(cct, "quota") {}
+ RGWS_Notify(CephContext *cct) : RGWService(cct, "notify") {}
int create_instance(const std::string& conf, RGWServiceInstanceRef *instance) override;
};
+class RGWSI_Notify_ShutdownCB;
+
class RGWSI_Notify : public RGWServiceInstance
{
+ friend class RGWWatcher;
+ friend class RGWSI_Notify_ShutdownCB;
+
public:
class CB;
+
private:
std::shared_ptr<RGWSI_Zone> zone_svc;
std::shared_ptr<RGWSI_RADOS> rados_svc;
+ std::shared_ptr<RGWSI_Finisher> finisher_svc;
std::map<std::string, RGWServiceInstance::dependency> get_deps() override;
int load(const std::string& conf, std::map<std::string, RGWServiceInstanceRef>& dep_refs) override;
@@ -41,13 +49,16 @@ private:
double inject_notify_timeout_probability{0};
unsigned max_notify_retries{0};
- friend class RGWWatcher;
-
string get_control_oid(int i);
RGWSI_RADOS::Obj pick_control_obj(const string& key);
CB *cb{nullptr};
+ int finisher_handle{0};
+ RGWSI_Notify_ShutdownCB *shutdown_cb{nullptr};
+
+ bool finalized{false};
+
int init_watch();
void finalize_watch();
@@ -65,8 +76,11 @@ private:
void set_enabled(bool status);
int robust_notify(RGWSI_RADOS::Obj& notify_obj, bufferlist& bl);
+
+ void schedule_context(Context *c);
public:
RGWSI_Notify(RGWService *svc, CephContext *cct): RGWServiceInstance(svc, cct) {}
+ ~RGWSI_Notify();
class CB {
public: