com.netflix.loadbalancer
Class LoadBalancerBuilder<T extends Server>
java.lang.Object
com.netflix.loadbalancer.LoadBalancerBuilder<T>
public class LoadBalancerBuilder<T extends Server>
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
newBuilder
public static <T extends Server> LoadBalancerBuilder<T> newBuilder()
withClientConfig
public LoadBalancerBuilder<T> withClientConfig(com.netflix.client.config.IClientConfig config)
withLoadBalancerExecutorRetryHandler
public LoadBalancerBuilder<T> withLoadBalancerExecutorRetryHandler(com.netflix.client.RetryHandler errorHandler)
withRule
public LoadBalancerBuilder<T> withRule(IRule rule)
withPing
public LoadBalancerBuilder<T> withPing(IPing ping)
withDynamicServerList
public LoadBalancerBuilder<T> withDynamicServerList(ServerList<T> serverListImpl)
withServerListFilter
public LoadBalancerBuilder<T> withServerListFilter(ServerListFilter<T> serverListFilter)
buildFixedServerListLoadBalancer
public BaseLoadBalancer buildFixedServerListLoadBalancer(java.util.List<T> servers)
buildDynamicServerListLoadBalancer
public ZoneAwareLoadBalancer<T> buildDynamicServerListLoadBalancer()
- Build a
ZoneAwareLoadBalancer with a dynamic ServerList and an IRule. The ServerList can be
either set in the withDynamicServerList(ServerList) or in the IClientConfig using CommonClientConfigKey.NIWSServerListClassName.
The IRule can be either set by withRule(IRule) or in the IClientConfig using
CommonClientConfigKey.NFLoadBalancerRuleClassName.
buildLoadBalancerFromConfigWithReflection
public ILoadBalancer buildLoadBalancerFromConfigWithReflection()
- Build a load balancer using the configuration from the
IClientConfig only. It uses reflection to initialize necessary load balancer
components.
buildDynamicServerListLoadBalancerExecutor
public LoadBalancerExecutor buildDynamicServerListLoadBalancerExecutor()
buildFixedServerListLoadBalancerExecutor
public LoadBalancerExecutor buildFixedServerListLoadBalancerExecutor(java.util.List<T> servers)