com.netflix.loadbalancer
Class ZoneAffinityServerListFilter<T extends Server>

java.lang.Object
  extended by com.netflix.loadbalancer.AbstractServerListFilter<T>
      extended by com.netflix.loadbalancer.ZoneAffinityServerListFilter<T>
All Implemented Interfaces:
com.netflix.client.IClientConfigAware, ServerListFilter<T>
Direct Known Subclasses:
ServerListSubsetFilter

public class ZoneAffinityServerListFilter<T extends Server>
extends AbstractServerListFilter<T>
implements com.netflix.client.IClientConfigAware

This server list filter deals with filtering out servers based on the Zone affinity. This filtering will be turned on if either CommonClientConfigKey.EnableZoneAffinity or CommonClientConfigKey.EnableZoneExclusivity is set to true in IClientConfig object passed into this class during initialization. When turned on, servers outside the same zone (as indicated by Server.getZone()) will be filtered out. By default, zone affinity and exclusivity are turned off and nothing is filtered out.


Constructor Summary
ZoneAffinityServerListFilter()
           
ZoneAffinityServerListFilter(com.netflix.client.config.IClientConfig niwsClientConfig)
           
 
Method Summary
 java.util.List<T> getFilteredListOfServers(java.util.List<T> servers)
           
 void initWithNiwsConfig(com.netflix.client.config.IClientConfig niwsClientConfig)
           
 java.lang.String toString()
           
 
Methods inherited from class com.netflix.loadbalancer.AbstractServerListFilter
getLoadBalancerStats, setLoadBalancerStats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZoneAffinityServerListFilter

public ZoneAffinityServerListFilter()

ZoneAffinityServerListFilter

public ZoneAffinityServerListFilter(com.netflix.client.config.IClientConfig niwsClientConfig)
Method Detail

initWithNiwsConfig

public void initWithNiwsConfig(com.netflix.client.config.IClientConfig niwsClientConfig)
Specified by:
initWithNiwsConfig in interface com.netflix.client.IClientConfigAware

getFilteredListOfServers

public java.util.List<T> getFilteredListOfServers(java.util.List<T> servers)
Specified by:
getFilteredListOfServers in interface ServerListFilter<T extends Server>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object