jamesge commented on a change in pull request #592: lb configurable && 
consistency hash lb refactor
URL: https://github.com/apache/incubator-brpc/pull/592#discussion_r272426700
 
 

 ##########
 File path: src/brpc/load_balancer.h
 ##########
 @@ -102,8 +104,21 @@ class LoadBalancer : public NonConstDescribable, public 
Destroyable {
     // Caller is responsible for Destroy() the instance after usage.
     virtual LoadBalancer* New() const = 0;
 
+    // Config user passed parameters to lb after constrction which 
+    // make lb function more flexible.
+    virtual bool SetParameters(const butil::StringPiece& params) { return 
true; }
 
 Review comment:
   为什么不把params放New的参数上?从通用的角度看,有些对象创建时就知道params可能会效率更高。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to