Package com.hazelcast.client.util
Class RandomLB
java.lang.Object
com.hazelcast.client.util.AbstractLoadBalancer
com.hazelcast.client.util.RandomLB
- All Implemented Interfaces:
LoadBalancer
,InitialMembershipListener
,MembershipListener
,EventListener
A
LoadBalancer
that selects a random member to route to.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether this instance supports getting data members through a call toLoadBalancer.nextDataMember()
.next()
Returns the next member to route to.Returns the next data member or null if no data member is available.Methods inherited from class com.hazelcast.client.util.AbstractLoadBalancer
getDataMembers, getMembers, init, init, memberAdded, memberRemoved
-
Constructor Details
-
RandomLB
public RandomLB()
-
-
Method Details
-
next
Description copied from interface:LoadBalancer
Returns the next member to route to.- Returns:
- Returns the next member or null if no member is available
-
nextDataMember
Description copied from interface:LoadBalancer
Returns the next data member or null if no data member is available. -
canGetNextDataMember
public boolean canGetNextDataMember()Description copied from interface:LoadBalancer
Returns whether this instance supports getting data members through a call toLoadBalancer.nextDataMember()
.- See Also:
-