Options
All
  • Public
  • Public/Protected
  • All
Menu

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 ClientNetworkConfig.smartRouting, only the operations that are not key based will be routed to the endpoint returned by the LoadBalancer. If it is not, the LoadBalancer will not be used.

Hierarchy

  • LoadBalancer

Implemented by

Index

Methods

canGetNextDataMember

  • canGetNextDataMember(): boolean
  • Returns whether this instance supports getting data members through a call to {@link nextDataMember()}.

    deprecated

    Since 5.0, the method is unused

    Returns boolean

    Returns true if this load balancer can get a data member.

initLoadBalancer

  • initLoadBalancer(cluster: Cluster, config: ClientConfig): void
  • Initializes the LoadBalancer.

    Parameters

    • cluster: Cluster

      the Cluster this LoadBalancer uses to select members from.

    • config: ClientConfig

      the ClientConfig.

    Returns void

next

  • next(): Member
  • Returns the next member to route to.

    Returns Member

    Returns the next member or null if no member is available

nextDataMember

  • nextDataMember(): Member
  • Returns the next data member to route to.

    deprecated

    Since 5.0, the method is unused

    Returns Member

    Returns the next data member or null if no data member is available

Generated using TypeDoc