|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.loadbalancer.AbstractLoadBalancerRule
com.netflix.loadbalancer.ClientConfigEnabledRoundRobinRule
com.netflix.loadbalancer.PredicateBasedRule
public abstract class PredicateBasedRule
A rule which delegates the server filtering logic to an instance of AbstractServerPredicate.
After filtering, a server is returned from filtered list in a round robin fashion.
| Constructor Summary | |
|---|---|
PredicateBasedRule()
|
|
| Method Summary | |
|---|---|
Server |
choose(java.lang.Object key)
Get a server by calling AbstractServerPredicate.chooseRandomlyAfterFiltering(java.util.List, Object). |
abstract AbstractServerPredicate |
getPredicate()
Method that provides an instance of AbstractServerPredicate to be used by this class. |
| Methods inherited from class com.netflix.loadbalancer.ClientConfigEnabledRoundRobinRule |
|---|
initWithNiwsConfig, setLoadBalancer |
| Methods inherited from class com.netflix.loadbalancer.AbstractLoadBalancerRule |
|---|
getLoadBalancer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PredicateBasedRule()
| Method Detail |
|---|
public abstract AbstractServerPredicate getPredicate()
AbstractServerPredicate to be used by this class.
public Server choose(java.lang.Object key)
AbstractServerPredicate.chooseRandomlyAfterFiltering(java.util.List, Object).
The performance for this method is O(n) where n is number of servers to be filtered.
choose in interface IRulechoose in class ClientConfigEnabledRoundRobinRule
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||