18 #include "hazelcast/util/export.h"
19 #include "hazelcast/client/member.h"
26 namespace connection {
27 class ClientConnectionManagerImpl;
50 template<
typename Handler,
51 typename = util::enable_if_rvalue_ref_trait<Handler&&>>
54 init_ = std::forward<Handler>(h);
58 template<
typename Handler,
59 typename = util::enable_if_rvalue_ref_trait<Handler&&>>
62 init_ = std::forward<Handler>(h);
63 return std::move(*
this);
71 template<
typename Handler,
72 typename = util::enable_if_rvalue_ref_trait<Handler&&>>
75 next_ = std::forward<Handler>(h);
79 template<
typename Handler,
80 typename = util::enable_if_rvalue_ref_trait<Handler&&>>
83 next_ = std::forward<Handler>(h);
84 return std::move(*
this);
92 std::function<void(cluster&)> init_ = util::noop<cluster&>;
93 std::function<boost::optional<member>(cluster&)> next_ = [](cluster&) {
97 friend class connection::ClientConnectionManagerImpl;
load_balancer allows you to send operations to one of a number of endpoints(Members).
load_balancer & init(Handler &&h) &
Sets the function to be called when load balancer is initialized.
load_balancer & next(Handler &&h) &
The function returns the next member to route to.