public interface LoadBalancer
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 the client is configured with ClientNetworkConfig.isSmartRouting()
,
operations that are not key-based will be routed to the endpoint returned by the LoadBalancer. For
non-smart clients, the LoadBalancer
is not used.
For configuration see ClientConfig.setLoadBalancer(LoadBalancer)
.
Modifier and Type | Method and Description |
---|---|
default boolean |
canGetNextDataMember()
Deprecated.
Since 5.0, the method is unused
|
void |
init(Cluster cluster,
ClientConfig config)
Initializes the LoadBalancer.
|
Member |
next()
Returns the next member to route to.
|
default Member |
nextDataMember()
Deprecated.
Since 5.0, the method is unused
|
void init(Cluster cluster, ClientConfig config)
cluster
- the Cluster this LoadBalancer uses to select members from.config
- the ClientConfig.Member next()
@Deprecated default Member nextDataMember()
UnsupportedOperationException
- if the operation is not supported by this instance@Deprecated default boolean canGetNextDataMember()
nextDataMember()
.nextDataMember()
Copyright © 2024 Hazelcast, Inc.. All rights reserved.