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:
Avi Kivity
2022-08-11 12:05:45 +03:00
parent 86a48cf12f
commit d9955ab35b

View File

@@ -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;
}