LoadBalancer allows you to send operations to one of a number of endpoints(Members). More...
#include <LoadBalancer.h>
Public Member Functions | |
virtual void | init (Cluster &cluster)=0 |
This method will be called when load balancer is initialized. More... | |
virtual const Member | next ()=0 |
Returns the next member to route to. More... | |
LoadBalancer allows you to send operations to one of a number of endpoints(Members).
It is up to the implementation to use different load balancing policies. If Client is configured as smart, only the operations that are not key based will be router to the endpoint returned by the Load Balancer. If it is not smart, LoadBalancer will not be used. Note Client is smart by default.
|
pure virtual |
This method will be called when load balancer is initialized.
cluster | Cluster contains current membership information for initialization. And one can add membership through this class for future notifications. |
|
pure virtual |
Returns the next member to route to.