]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | |
2 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | |
3 | // vim: ts=8 sw=2 smarttab | |
4 | ||
5 | /* | |
6 | * Ceph - scalable distributed file system | |
7 | * | |
8 | * Copyright (C) 2019 Red Hat, Inc. | |
9 | * | |
10 | * This is free software; you can redistribute it and/or | |
11 | * modify it under the terms of the GNU Lesser General Public | |
12 | * License version 2.1, as published by the Free Software | |
13 | * Foundation. See file COPYING. | |
14 | * | |
15 | */ | |
16 | ||
17 | ||
18 | #pragma once | |
19 | ||
20 | #include "rgw/rgw_service.h" | |
21 | ||
22 | #include "svc_bucket_types.h" | |
23 | ||
24 | class RGWBucketSyncPolicyHandler; | |
25 | using RGWBucketSyncPolicyHandlerRef = std::shared_ptr<RGWBucketSyncPolicyHandler>; | |
26 | ||
27 | ||
28 | class RGWSI_Bucket_Sync : public RGWServiceInstance | |
29 | { | |
30 | public: | |
31 | RGWSI_Bucket_Sync(CephContext *cct) : RGWServiceInstance(cct) {} | |
32 | ||
33 | virtual int get_policy_handler(RGWSI_Bucket_X_Ctx& ctx, | |
34 | std::optional<rgw_zone_id> zone, | |
35 | std::optional<rgw_bucket> bucket, | |
36 | RGWBucketSyncPolicyHandlerRef *handler, | |
b3b6e05e TL |
37 | optional_yield y, |
38 | const DoutPrefixProvider *dpp) = 0; | |
9f95a23c | 39 | |
b3b6e05e TL |
40 | virtual int handle_bi_update(const DoutPrefixProvider *dpp, |
41 | RGWBucketInfo& bucket_info, | |
9f95a23c TL |
42 | RGWBucketInfo *orig_bucket_info, |
43 | optional_yield y) = 0; | |
b3b6e05e TL |
44 | virtual int handle_bi_removal(const DoutPrefixProvider *dpp, |
45 | const RGWBucketInfo& bucket_info, | |
9f95a23c TL |
46 | optional_yield y) = 0; |
47 | ||
b3b6e05e TL |
48 | virtual int get_bucket_sync_hints(const DoutPrefixProvider *dpp, |
49 | const rgw_bucket& bucket, | |
9f95a23c TL |
50 | std::set<rgw_bucket> *sources, |
51 | std::set<rgw_bucket> *dests, | |
52 | optional_yield y) = 0; | |
53 | }; | |
54 | ||
55 |