load_balancer allows you to send operations to one of a number of endpoints(Members).
More...
#include <load_balancer.h>
|
template<typename Handler, typename = util::enable_if_rvalue_ref_trait<Handler&&>> |
load_balancer & | init (Handler &&h) & |
| Sets the function to be called when load balancer is initialized.
|
template<typename Handler, typename = util::enable_if_rvalue_ref_trait<Handler&&>> |
load_balancer && | init (Handler &&h) && |
template<typename Handler, typename = util::enable_if_rvalue_ref_trait<Handler&&>> |
load_balancer & | next (Handler &&h) & |
| The function returns the next member to route to.
|
template<typename Handler, typename = util::enable_if_rvalue_ref_trait<Handler&&>> |
load_balancer && | next (Handler &&h) && |
load_balancer 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, load_balancer will not be used. Note: Client is smart by default.
Definition at line 40 of file load_balancer.h.
◆ init() [1/2]
template<typename Handler, typename = util::enable_if_rvalue_ref_trait<Handler&&>>
load_balancer & hazelcast::client::load_balancer::init |
( |
Handler && | h | ) |
& |
|
inline |
Sets the function to be called when load balancer is initialized.
- Parameters
-
cluster | Cluster contains current membership information for initialization. And one can add membership through this class for future notifications. |
Definition at line 52 of file load_balancer.h.
53 {
54 init_ = std::forward<Handler>(h);
55 return *this;
56 }
◆ init() [2/2]
template<typename Handler, typename = util::enable_if_rvalue_ref_trait<Handler&&>>
load_balancer && hazelcast::client::load_balancer::init |
( |
Handler && | h | ) |
&& |
|
inline |
Definition at line 60 of file load_balancer.h.
61 {
62 init_ = std::forward<Handler>(h);
63 return std::move(*this);
64 }
◆ next() [1/2]
template<typename Handler, typename = util::enable_if_rvalue_ref_trait<Handler&&>>
load_balancer & hazelcast::client::load_balancer::next |
( |
Handler && | h | ) |
& |
|
inline |
The function returns the next member to route to.
- Parameters
-
h | The function to be used for finding the next member. |
Definition at line 73 of file load_balancer.h.
74 {
75 next_ = std::forward<Handler>(h);
76 return *this;
77 }
◆ next() [2/2]
template<typename Handler, typename = util::enable_if_rvalue_ref_trait<Handler&&>>
load_balancer && hazelcast::client::load_balancer::next |
( |
Handler && | h | ) |
&& |
|
inline |
Definition at line 81 of file load_balancer.h.
82 {
83 next_ = std::forward<Handler>(h);
84 return std::move(*this);
85 }
◆ connection::ClientConnectionManagerImpl
friend class connection::ClientConnectionManagerImpl |
|
friend |
The documentation for this class was generated from the following file: