com.netflix.loadbalancer
Class ZoneAvoidancePredicate

java.lang.Object
  extended by com.netflix.loadbalancer.AbstractServerPredicate
      extended by com.netflix.loadbalancer.ZoneAvoidancePredicate
All Implemented Interfaces:
com.google.common.base.Predicate<PredicateKey>

public class ZoneAvoidancePredicate
extends AbstractServerPredicate

A server predicate that filters out all servers in a worst zone if the aggregated metric for that zone reaches a threshold. The logic to determine the worst zone is described in class ZoneAwareLoadBalancer.


Field Summary
 
Fields inherited from class com.netflix.loadbalancer.AbstractServerPredicate
rule
 
Constructor Summary
ZoneAvoidancePredicate(IRule rule, com.netflix.client.config.IClientConfig clientConfig)
           
ZoneAvoidancePredicate(LoadBalancerStats lbStats, com.netflix.client.config.IClientConfig clientConfig)
           
 
Method Summary
 boolean apply(PredicateKey input)
           
 
Methods inherited from class com.netflix.loadbalancer.AbstractServerPredicate
alwaysTrue, chooseRandomlyAfterFiltering, chooseRandomlyAfterFiltering, chooseRoundRobinAfterFiltering, chooseRoundRobinAfterFiltering, getEligibleServers, getEligibleServers, getLBStats, getServerOnlyPredicate, ofKeyPredicate, ofServerPredicate, setLoadBalancerStats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Predicate
equals
 

Constructor Detail

ZoneAvoidancePredicate

public ZoneAvoidancePredicate(IRule rule,
                              com.netflix.client.config.IClientConfig clientConfig)

ZoneAvoidancePredicate

public ZoneAvoidancePredicate(LoadBalancerStats lbStats,
                              com.netflix.client.config.IClientConfig clientConfig)
Method Detail

apply

public boolean apply(@Nullable
                     PredicateKey input)