Class RandomLB

All Implemented Interfaces:
LoadBalancer, InitialMembershipListener, MembershipListener, EventListener

public class RandomLB extends AbstractLoadBalancer
A LoadBalancer that selects a random member to route to.
  • Constructor Details

    • RandomLB

      public RandomLB()
  • Method Details

    • next

      public Member 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

      public Member 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 to LoadBalancer.nextDataMember().
      See Also: