| 206 | } |
| 207 | |
| 208 | bool AFCNetClientService::GetServerNode(const std::string& hash_key, AFVNode& vnode) |
| 209 | { |
| 210 | auto iter = consistent_hashmap_.find(hash_key); |
| 211 | if (iter == consistent_hashmap_.end()) |
| 212 | { |
| 213 | return false; |
| 214 | } |
| 215 | else |
| 216 | { |
| 217 | vnode = iter->second; |
| 218 | return true; |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | void AFCNetClientService::RemoveServerNode(std::shared_ptr<AFConnectionData> data) |
| 223 | { |