com.hazelcast.client

## Interface LoadBalancer

- All Known Implementing Classes:
    AbstractLoadBalancer, RandomLB, RoundRobinLB, StaticLB

      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 Client is configured with `ClientConfig.isSmartRouting()`, only the operations that are not key based will be router to the endpoint returned by the LoadBalancer. If it is not `ClientConfig.isSmartRouting()`, `LoadBalancer` will not be used.

  For configuration see `ClientConfig.setLoadBalancer(LoadBalancer)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `init(Cluster cluster, ClientConfig config)` Initializes the LoadBalancer.
    `Member` | `next()` Returns the next member to route to.

- - ### Method Detail

    - #### init

          void init(Cluster cluster,
                    ClientConfig config)

      Initializes the LoadBalancer.
      Parameters:
        `cluster` - the Cluster this LoadBalancer uses to select members from.
        `config` - the ClientConfig.

    - #### next

          Member next()

      Returns the next member to route to.
      Returns:
        Returns the next member or null if no member is available

Copyright © 2019. All rights reserved.