Skip to content

Commit

Permalink
Merge pull request #13441 from Liuchang0812/cleanup-rgw
Browse files Browse the repository at this point in the history
rgw: add override in rgw subsystem
  • Loading branch information
mattbenjamin committed Feb 15, 2017
2 parents 6d95cb8 + cdc8887 commit 89aaa6d
Show file tree
Hide file tree
Showing 22 changed files with 238 additions and 238 deletions.
4 changes: 2 additions & 2 deletions src/cls/rgw/cls_rgw_client.cc
Expand Up @@ -25,7 +25,7 @@ class ClsBucketIndexOpCtx : public ObjectOperationCompletion {
public:
ClsBucketIndexOpCtx(T* _data, int *_ret_code) : data(_data), ret_code(_ret_code) { assert(data); }
~ClsBucketIndexOpCtx() {}
void handle_completion(int r, bufferlist& outbl) {
void handle_completion(int r, bufferlist& outbl) override {
if (r >= 0) {
try {
bufferlist::iterator iter = outbl.begin();
Expand Down Expand Up @@ -523,7 +523,7 @@ class GetDirHeaderCompletion : public ObjectOperationCompletion {
~GetDirHeaderCompletion() {
ret_ctx->put();
}
void handle_completion(int r, bufferlist& outbl) {
void handle_completion(int r, bufferlist& outbl) override {
struct rgw_cls_list_ret ret;
try {
bufferlist::iterator iter = outbl.begin();
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/librgw.cc
Expand Up @@ -70,7 +70,7 @@ namespace rgw {
class C_InitTimeout : public Context {
public:
C_InitTimeout() {}
void finish(int r) {
void finish(int r) override {
derr << "Initialization timeout, failed to initialize" << dendl;
exit(1);
}
Expand Down
10 changes: 5 additions & 5 deletions src/rgw/rgw_auth.cc
Expand Up @@ -41,23 +41,23 @@ rgw_auth_transform_old_authinfo(req_state * const s)
is_admin(is_admin) {
}

uint32_t get_perms_from_aclspec(const aclspec_t& aclspec) const {
uint32_t get_perms_from_aclspec(const aclspec_t& aclspec) const override {
return rgw_perms_from_aclspec_default_strategy(id, aclspec);
}

bool is_admin_of(const rgw_user& acct_id) const {
bool is_admin_of(const rgw_user& acct_id) const override {
return is_admin;
}

bool is_owner_of(const rgw_user& acct_id) const {
bool is_owner_of(const rgw_user& acct_id) const override {
return id == acct_id;
}

uint32_t get_perm_mask() const {
uint32_t get_perm_mask() const override {
return perm_mask;
}

void to_str(std::ostream& out) const {
void to_str(std::ostream& out) const override {
out << "RGWDummyIdentityApplier(auth_id=" << id
<< ", perm_mask=" << perm_mask
<< ", is_admin=" << is_admin << ")";
Expand Down
34 changes: 17 additions & 17 deletions src/rgw/rgw_bucket.cc
Expand Up @@ -1924,9 +1924,9 @@ void RGWBucketCompleteInfo::decode_json(JSONObj *obj) {
class RGWBucketMetadataHandler : public RGWMetadataHandler {

public:
string get_type() { return "bucket"; }
string get_type() override { return "bucket"; }

int get(RGWRados *store, string& entry, RGWMetadataObject **obj) {
int get(RGWRados *store, string& entry, RGWMetadataObject **obj) override {
RGWObjVersionTracker ot;
RGWBucketEntryPoint be;

Expand All @@ -1948,7 +1948,7 @@ class RGWBucketMetadataHandler : public RGWMetadataHandler {
}

int put(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker,
real_time mtime, JSONObj *obj, sync_type_t sync_type) {
real_time mtime, JSONObj *obj, sync_type_t sync_type) override {
RGWBucketEntryPoint be, old_be;
try {
decode_json_obj(be, obj);
Expand Down Expand Up @@ -1996,7 +1996,7 @@ class RGWBucketMetadataHandler : public RGWMetadataHandler {
RGWListRawObjsCtx ctx;
};

int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) {
int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) override {
RGWBucketEntryPoint be;
RGWObjectCtx obj_ctx(store);

Expand Down Expand Up @@ -2024,12 +2024,12 @@ class RGWBucketMetadataHandler : public RGWMetadataHandler {
return 0;
}

void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) {
void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) override {
oid = key;
bucket = store->get_zone_params().domain_root;
}

int list_keys_init(RGWRados *store, void **phandle)
int list_keys_init(RGWRados *store, void **phandle) override
{
list_keys_info *info = new list_keys_info;

Expand All @@ -2040,7 +2040,7 @@ class RGWBucketMetadataHandler : public RGWMetadataHandler {
return 0;
}

int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) {
int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) override {
list_keys_info *info = static_cast<list_keys_info *>(handle);

string no_filter;
Expand Down Expand Up @@ -2074,7 +2074,7 @@ class RGWBucketMetadataHandler : public RGWMetadataHandler {
return 0;
}

void list_keys_complete(void *handle) {
void list_keys_complete(void *handle) override {
list_keys_info *info = static_cast<list_keys_info *>(handle);
delete info;
}
Expand All @@ -2083,9 +2083,9 @@ class RGWBucketMetadataHandler : public RGWMetadataHandler {
class RGWBucketInstanceMetadataHandler : public RGWMetadataHandler {

public:
string get_type() { return "bucket.instance"; }
string get_type() override { return "bucket.instance"; }

int get(RGWRados *store, string& oid, RGWMetadataObject **obj) {
int get(RGWRados *store, string& oid, RGWMetadataObject **obj) override {
RGWBucketCompleteInfo bci;

real_time mtime;
Expand All @@ -2103,7 +2103,7 @@ class RGWBucketInstanceMetadataHandler : public RGWMetadataHandler {
}

int put(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker,
real_time mtime, JSONObj *obj, sync_type_t sync_type) {
real_time mtime, JSONObj *obj, sync_type_t sync_type) override {
RGWBucketCompleteInfo bci, old_bci;
try {
decode_json_obj(bci, obj);
Expand Down Expand Up @@ -2178,7 +2178,7 @@ class RGWBucketInstanceMetadataHandler : public RGWMetadataHandler {
RGWListRawObjsCtx ctx;
};

int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) {
int remove(RGWRados *store, string& entry, RGWObjVersionTracker& objv_tracker) override {
RGWBucketInfo info;
RGWObjectCtx obj_ctx(store);

Expand All @@ -2189,13 +2189,13 @@ class RGWBucketInstanceMetadataHandler : public RGWMetadataHandler {
return rgw_bucket_instance_remove_entry(store, entry, &info.objv_tracker);
}

void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) {
void get_pool_and_oid(RGWRados *store, const string& key, rgw_bucket& bucket, string& oid) override {
oid = RGW_BUCKET_INSTANCE_MD_PREFIX + key;
rgw_bucket_instance_key_to_oid(oid);
bucket = store->get_zone_params().domain_root;
}

int list_keys_init(RGWRados *store, void **phandle)
int list_keys_init(RGWRados *store, void **phandle) override
{
list_keys_info *info = new list_keys_info;

Expand All @@ -2206,7 +2206,7 @@ class RGWBucketInstanceMetadataHandler : public RGWMetadataHandler {
return 0;
}

int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) {
int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) override {
list_keys_info *info = static_cast<list_keys_info *>(handle);

string no_filter;
Expand Down Expand Up @@ -2243,7 +2243,7 @@ class RGWBucketInstanceMetadataHandler : public RGWMetadataHandler {
return 0;
}

void list_keys_complete(void *handle) {
void list_keys_complete(void *handle) override {
list_keys_info *info = static_cast<list_keys_info *>(handle);
delete info;
}
Expand All @@ -2253,7 +2253,7 @@ class RGWBucketInstanceMetadataHandler : public RGWMetadataHandler {
* point, so that the log entries end up at the same log shard, so that we process them
* in order
*/
virtual void get_hash_key(const string& section, const string& key, string& hash_key) {
void get_hash_key(const string& section, const string& key, string& hash_key) override {
string k;
int pos = key.find(':');
if (pos < 0)
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_coroutine.cc
Expand Up @@ -14,7 +14,7 @@ class RGWCompletionManager::WaitContext : public Context {
void *opaque;
public:
WaitContext(RGWCompletionManager *_cm, void *_opaque) : manager(_cm), opaque(_opaque) {}
void finish(int r) {
void finish(int r) override {
manager->_wakeup(opaque);
}
};
Expand Down

0 comments on commit 89aaa6d

Please sign in to comment.