public class RoundRobinLB extends AbstractLoadBalancer
LoadBalancer
implementation that relies on using round robin
to a next member to send a request to.
Round robin is done based on best effort basis, the order of members for concurrent calls to
the next()
is not guaranteed.Constructor and Description |
---|
RoundRobinLB() |
RoundRobinLB(int seed) |
Modifier and Type | Method and Description |
---|---|
boolean |
canGetNextDataMember()
Returns whether this instance supports getting data members through a call to
LoadBalancer.nextDataMember() . |
Member |
next()
Returns the next member to route to.
|
Member |
nextDataMember()
Returns the next data member to route to.
|
getDataMembers, getMembers, init, init, memberAdded, memberRemoved
public Member next()
LoadBalancer
public Member nextDataMember()
LoadBalancer
public boolean canGetNextDataMember()
LoadBalancer
LoadBalancer.nextDataMember()
.
This method is used by components that require communication with data members only, such as the SQL engine.
true
if this instance supports getting data members through a call to LoadBalancer.nextDataMember()
LoadBalancer.nextDataMember()
Copyright © 2022 Hazelcast, Inc.. All rights reserved.