@Test public void testNonZoneOverride() { ZoneAwareLoadBalancer<Server> balancer = new ZoneAwareLoadBalancer<Server>(); balancer.init(); LoadBalancerStats loadBalancerStats = balancer.getLoadBalancerStats(); assertNotNull(loadBalancerStats); List<Server> servers = new ArrayList<Server>(); for (int i = 1; i <= 11; i++) { servers.add(createServer(i, "a")); servers.add(createServer(i, "b")); servers.add(createServer(i, "c")); } balancer.setServersList(servers); balancer.setUpServerList(servers); loadBalancerStats.incrementActiveRequestsCount(createServer(1, "b")); loadBalancerStats.incrementActiveRequestsCount(createServer(1, "c")); testChooseServer(balancer, "us-east-1a", "us-east-1b", "us-east-1c"); loadBalancerStats.incrementActiveRequestsCount(createServer(1, "b")); loadBalancerStats.incrementActiveRequestsCount(createServer(1, "b")); testChooseServer(balancer, "us-east-1a", "us-east-1c"); loadBalancerStats.incrementActiveRequestsCount(createServer(2, "c")); loadBalancerStats.incrementActiveRequestsCount(createServer(4, "c")); testChooseServer(balancer, "us-east-1a", "us-east-1b", "us-east-1c"); }
void setUpServerList(List<Server> upServerList) { this.upServerList = upServerList; }
ZoneAwareLoadBalancer extends DynamicServerListLoadBalancer<T> { void setUpServerList(List<Server> upServerList) { this.upServerList = upServerList; } }
ZoneAwareLoadBalancer extends DynamicServerListLoadBalancer<T> { void setUpServerList(List<Server> upServerList) { this.upServerList = upServerList; } @Deprecated  ZoneAwareLoadBalancer(IClientConfig clientConfig, IRule rule,
            IPing ping, ServerList<T> serverList, ServerListFilter<T> filter);  ZoneAwareLoadBalancer(IClientConfig clientConfig, IRule rule,
                                 IPing ping, ServerList<T> serverList, ServerListFilter<T> filter,
                                 ServerListUpdater serverListUpdater);  ZoneAwareLoadBalancer(); }
ZoneAwareLoadBalancer extends DynamicServerListLoadBalancer<T> { void setUpServerList(List<Server> upServerList) { this.upServerList = upServerList; } @Deprecated  ZoneAwareLoadBalancer(IClientConfig clientConfig, IRule rule,
            IPing ping, ServerList<T> serverList, ServerListFilter<T> filter);  ZoneAwareLoadBalancer(IClientConfig clientConfig, IRule rule,
                                 IPing ping, ServerList<T> serverList, ServerListFilter<T> filter,
                                 ServerListUpdater serverListUpdater);  ZoneAwareLoadBalancer(); @Override void initWithNiwsConfig(IClientConfig clientConfig); @Override Server chooseServer(Object key); @Override void setRule(IRule rule); }
ZoneAwareLoadBalancer extends DynamicServerListLoadBalancer<T> { void setUpServerList(List<Server> upServerList) { this.upServerList = upServerList; } @Deprecated  ZoneAwareLoadBalancer(IClientConfig clientConfig, IRule rule,
            IPing ping, ServerList<T> serverList, ServerListFilter<T> filter);  ZoneAwareLoadBalancer(IClientConfig clientConfig, IRule rule,
                                 IPing ping, ServerList<T> serverList, ServerListFilter<T> filter,
                                 ServerListUpdater serverListUpdater);  ZoneAwareLoadBalancer(); @Override void initWithNiwsConfig(IClientConfig clientConfig); @Override Server chooseServer(Object key); @Override void setRule(IRule rule);  }