Util¶
- class LoadBalancer[source]¶
Bases:
object
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 the client is configured with smart routing, only the operations that are not key based will be routed to the endpoint
- init(cluster_service)[source]¶
Initializes the load balancer.
- Parameters
cluster_service (hazelcast.cluster.ClusterService) – The cluster service to select members from
- next()[source]¶
Returns the next member to route to.
- Returns
the next member or
None
if no member is available.- Return type
- next_data_member()[source]¶
Returns the next data member to route to.
- Returns
The next data member or
None
if no data member is available.- Return type
- can_get_next_data_member()[source]¶
- Returns whether this instance supports getting data members
through a call to
next_data_member()
.
- Returns
True
if this instance supports getting data members.- Return type
bool