Options
All
  • Public
  • Public/Protected
  • All
Menu

Abstract Load Balancer to be used in built-in and user-provided LoadBalancer implementations.

Hierarchy

  • AbstractLoadBalancer

Implements

Index

Constructors

constructor

  • new AbstractLoadBalancer(): AbstractLoadBalancer
  • Returns AbstractLoadBalancer

Methods

Abstract canGetNextDataMember

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

    Returns boolean

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

init

  • init(event: InitialMembershipEvent): void
  • Parameters

    • event: InitialMembershipEvent

    Returns void

initLoadBalancer

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

    Parameters

    • cluster: Cluster
    • config: ClientConfig

    Returns void

memberAdded

  • memberAdded(membership: MembershipEvent): void
  • Parameters

    • membership: MembershipEvent

    Returns void

memberRemoved

  • memberRemoved(membership: MembershipEvent): void
  • Parameters

    • membership: MembershipEvent

    Returns void

Abstract next

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

    Returns Member

    Returns the next member or null if no member is available

Abstract nextDataMember

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

    Returns Member

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

Generated using TypeDoc