com.netflix.loadbalancer
Class ConfigurationBasedServerList

java.lang.Object
  extended by com.netflix.loadbalancer.AbstractServerList<Server>
      extended by com.netflix.loadbalancer.ConfigurationBasedServerList
All Implemented Interfaces:
com.netflix.client.IClientConfigAware, ServerList<Server>

public class ConfigurationBasedServerList
extends AbstractServerList<Server>

Utility class that can load the List of Servers from a Configuration (i.e properties available via Archaius). The property name be defined in this format:

<clientName>.<nameSpace>.listOfServers=<comma delimited hostname:port strings>


Constructor Summary
ConfigurationBasedServerList()
           
 
Method Summary
 java.util.List<Server> getInitialListOfServers()
           
 java.util.List<Server> getUpdatedListOfServers()
          Return updated list of servers.
 void initWithNiwsConfig(com.netflix.client.config.IClientConfig clientConfig)
           
 
Methods inherited from class com.netflix.loadbalancer.AbstractServerList
getFilterImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationBasedServerList

public ConfigurationBasedServerList()
Method Detail

getInitialListOfServers

public java.util.List<Server> getInitialListOfServers()

getUpdatedListOfServers

public java.util.List<Server> getUpdatedListOfServers()
Description copied from interface: ServerList
Return updated list of servers. This is called say every 30 secs (configurable) by the Loadbalancer's Ping cycle


initWithNiwsConfig

public void initWithNiwsConfig(com.netflix.client.config.IClientConfig clientConfig)