| 285 | } |
| 286 | |
| 287 | LoadBalancer *ConsistentHashingLoadBalancer::New(const butil::StringPiece& params) const { |
| 288 | ConsistentHashingLoadBalancer* lb = |
| 289 | new (std::nothrow) ConsistentHashingLoadBalancer(_type); |
| 290 | if (lb && !lb->SetParameters(params)) { |
| 291 | delete lb; |
| 292 | lb = nullptr; |
| 293 | } |
| 294 | return lb; |
| 295 | } |
| 296 | |
| 297 | void ConsistentHashingLoadBalancer::Destroy() { |
| 298 | delete this; |
nothing calls this directly
no test coverage detected