locator: token_metadata: drop unused and dangerous accessors

The mutable get_datacenter_endpoints() and get_datacenter_racks() are
dangerous since they expose internal members without enforcing class
invariants. Fortunately they are unused, so delete them.

Closes #11454
This commit is contained in:
Avi Kivity
2022-09-05 15:21:00 +03:00
committed by Botond Dénes
parent 3f8cb608c3
commit ae4b2ee583

View File

@@ -65,25 +65,12 @@ public:
*/
bool has_endpoint(inet_address) const;
std::unordered_map<sstring,
std::unordered_set<inet_address>>&
get_datacenter_endpoints() {
return _dc_endpoints;
}
const std::unordered_map<sstring,
std::unordered_set<inet_address>>&
get_datacenter_endpoints() const {
return _dc_endpoints;
}
std::unordered_map<sstring,
std::unordered_map<sstring,
std::unordered_set<inet_address>>>&
get_datacenter_racks() {
return _dc_racks;
}
const std::unordered_map<sstring,
std::unordered_map<sstring,
std::unordered_set<inet_address>>>&