token_metadata: Add add_moving_endpoint

This commit is contained in:
Asias He
2015-11-05 17:22:34 +08:00
parent 0fc6e76d1e
commit c90e9c97f5
2 changed files with 6 additions and 17 deletions

View File

@@ -483,6 +483,10 @@ token_metadata token_metadata::clone_after_all_settled() {
return metadata;
}
void token_metadata::add_moving_endpoint(token t, inet_address endpoint) {
_moving_endpoints[t] = endpoint;
}
/////////////////// class topology /////////////////////////////////////////////
inline void topology::clear() {
_dc_endpoints.clear();

View File

@@ -473,29 +473,14 @@ public:
void remove_bootstrap_tokens(std::unordered_set<token> tokens);
void add_leaving_endpoint(inet_address endpoint);
public:
#if 0
/**
* Add a new moving endpoint
* @param token token which is node moving to
* @param endpoint address of the moving node
*/
public void addMovingEndpoint(Token token, InetAddress endpoint)
{
assert endpoint != null;
lock.writeLock().lock();
try
{
_moving_endpoints.add(Pair.create(token, endpoint));
}
finally
{
lock.writeLock().unlock();
}
}
#endif
void add_moving_endpoint(token t, inet_address endpoint);
public:
void remove_endpoint(inet_address endpoint);