public class StaticLB extends Object implements LoadBalancer
LoadBalancer
that always returns the same member. This can
be useful for testing if you want to hit a specific member.Modifier and Type | Method and Description |
---|---|
void |
init(Cluster cluster,
ClientConfig config)
Initializes the LoadBalancer.
|
Member |
next()
Returns the next member to route to.
|
public StaticLB(Member member)
public void init(Cluster cluster, ClientConfig config)
LoadBalancer
init
in interface LoadBalancer
cluster
- the Cluster this LoadBalancer uses to select members from.config
- the ClientConfig.public Member next()
LoadBalancer
next
in interface LoadBalancer
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.