com.netflix.loadbalancer
Class RetryRule
java.lang.Object
com.netflix.loadbalancer.AbstractLoadBalancerRule
com.netflix.loadbalancer.RetryRule
- All Implemented Interfaces:
- com.netflix.client.IClientConfigAware, IRule
public class RetryRule
- extends AbstractLoadBalancerRule
Given that
IRule can be cascaded, this RetryRule class allows adding a retry logic to an existing Rule.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RetryRule
public RetryRule()
RetryRule
public RetryRule(IRule subRule)
RetryRule
public RetryRule(IRule subRule,
long maxRetryMillis)
setRule
public void setRule(IRule subRule)
getRule
public IRule getRule()
setMaxRetryMillis
public void setMaxRetryMillis(long maxRetryMillis)
getMaxRetryMillis
public long getMaxRetryMillis()
setLoadBalancer
public void setLoadBalancer(ILoadBalancer lb)
- Specified by:
setLoadBalancer in interface IRule- Overrides:
setLoadBalancer in class AbstractLoadBalancerRule
choose
public Server choose(ILoadBalancer lb,
java.lang.Object key)
choose
public Server choose(java.lang.Object key)
initWithNiwsConfig
public void initWithNiwsConfig(com.netflix.client.config.IClientConfig clientConfig)