MCPcopy Create free account
hub / github.com/apache/brpc / New

Method New

src/brpc/policy/consistent_hashing_load_balancer.cpp:287–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287LoadBalancer *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
297void ConsistentHashingLoadBalancer::Destroy() {
298 delete this;

Callers

nothing calls this directly

Calls 1

SetParametersMethod · 0.45

Tested by

no test coverage detected