locator: effective_replication_map: provide non-smart-pointer accessor to token_metadata
token_metadata is protected by holders of an effective_replication_map_ptr, so it's just as safe and less expensive for them to obtain a reference to token_metadata rather than a smart pointer, so give them that option with a new accessor.
This commit is contained in:
@@ -172,6 +172,10 @@ public:
|
||||
effective_replication_map(effective_replication_map&&) = default;
|
||||
~effective_replication_map();
|
||||
|
||||
const token_metadata& get_token_metadata() const noexcept {
|
||||
return *_tmptr;
|
||||
}
|
||||
|
||||
const token_metadata_ptr& get_token_metadata_ptr() const noexcept {
|
||||
return _tmptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user