diff --git a/locator/token_metadata.cc b/locator/token_metadata.cc index 3983649d0c..8485c303ca 100644 --- a/locator/token_metadata.cc +++ b/locator/token_metadata.cc @@ -180,7 +180,7 @@ gms::inet_address token_metadata::get_endpoint_for_host_id(UUID host_id) { return (*it).first; } -const auto& token_metadata::get_endpoint_to_host_id_map_for_reading() { +const std::unordered_map& token_metadata::get_endpoint_to_host_id_map_for_reading() const{ return _endpoint_to_host_id_map; } diff --git a/locator/token_metadata.hh b/locator/token_metadata.hh index d47e27019c..b1d5760825 100644 --- a/locator/token_metadata.hh +++ b/locator/token_metadata.hh @@ -80,6 +80,17 @@ public: const std::map& get_token_to_endpoint() const { return _token_to_endpoint_map; } + + const std::unordered_set& get_leaving_endpoints() const { + return _leaving_endpoints; + } + + const std::unordered_map& get_moving_endpoints() const { + return _moving_endpoints; + } + const std::unordered_map& get_bootstrap_tokens() const { + return _bootstrap_tokens; + } void debug_show(); #if 0 private static final Logger logger = LoggerFactory.getLogger(TokenMetadata.class); @@ -267,7 +278,7 @@ public: inet_address get_endpoint_for_host_id(UUID host_id); /** @return a copy of the endpoint-to-id map for read-only operations */ - const auto& get_endpoint_to_host_id_map_for_reading(); + const std::unordered_map& get_endpoint_to_host_id_map_for_reading() const; void add_bootstrap_token(token t, inet_address endpoint);