]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_sync_module_pubsub.h
import ceph quincy 17.2.6
[ceph.git] / ceph / src / rgw / rgw_sync_module_pubsub.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
3
4 #ifndef CEPH_RGW_SYNC_MODULE_PUBSUB_H
5 #define CEPH_RGW_SYNC_MODULE_PUBSUB_H
6
7 #include "rgw_sync_module.h"
8
9 class RGWPSSyncModule : public RGWSyncModule {
10 public:
11 RGWPSSyncModule() {}
12 bool supports_data_export() override {
13 return false;
14 }
15 bool supports_writes() override {
16 return true;
17 }
18 int create_instance(const DoutPrefixProvider *dpp, CephContext *cct, const JSONFormattable& config, RGWSyncModuleInstanceRef *instance) override;
19 };
20
21 class RGWPSDataSyncModule;
22 class RGWRESTConn;
23
24 class RGWPSSyncModuleInstance : public RGWSyncModuleInstance {
25 std::unique_ptr<RGWPSDataSyncModule> data_handler;
26 JSONFormattable effective_conf;
27 public:
28 RGWPSSyncModuleInstance(const DoutPrefixProvider *dpp, CephContext *cct, const JSONFormattable& config);
29 ~RGWPSSyncModuleInstance() = default;
30 RGWDataSyncModule *get_data_handler() override;
31 RGWRESTMgr *get_rest_filter(int dialect, RGWRESTMgr *orig) override;
32 bool supports_user_writes() override {
33 return true;
34 }
35 const JSONFormattable& get_effective_conf() {
36 return effective_conf;
37 }
38 // start with full sync based on configuration
39 // default to incremental only
40 virtual bool should_full_sync() const override;
41 };
42
43 #endif