public class ZoneAffinityServerListFilter<T extends Server> extends AbstractServerListFilter<T> implements com.netflix.client.IClientConfigAware
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 and Description |
---|
ZoneAffinityServerListFilter()
Deprecated.
Must pass in a config via
ZoneAffinityServerListFilter(IClientConfig) |
ZoneAffinityServerListFilter(com.netflix.client.config.IClientConfig niwsClientConfig) |
Modifier and Type | Method and Description |
---|---|
java.util.List<T> |
getFilteredListOfServers(java.util.List<T> servers) |
void |
initWithNiwsConfig(com.netflix.client.config.IClientConfig niwsClientConfig) |
java.lang.String |
toString() |
getLoadBalancerStats, setLoadBalancerStats
@Deprecated public ZoneAffinityServerListFilter()
ZoneAffinityServerListFilter(IClientConfig)
public ZoneAffinityServerListFilter(com.netflix.client.config.IClientConfig niwsClientConfig)
public void initWithNiwsConfig(com.netflix.client.config.IClientConfig niwsClientConfig)
initWithNiwsConfig
in interface com.netflix.client.IClientConfigAware
public java.util.List<T> getFilteredListOfServers(java.util.List<T> servers)
getFilteredListOfServers
in interface ServerListFilter<T extends Server>
public java.lang.String toString()
toString
in class java.lang.Object