com.netflix.loadbalancer
Class RetryRule

java.lang.Object
  extended by com.netflix.loadbalancer.RetryRule
All Implemented Interfaces:
IRule

public class RetryRule
extends java.lang.Object
implements IRule

Given that IRule can be cascaded, this RetryRule class allows adding a retry logic to an existing Rule.


Constructor Summary
RetryRule()
           
RetryRule(IRule subRule)
           
RetryRule(IRule subRule, long maxRetryMillis)
           
 
Method Summary
 Server choose(BaseLoadBalancer lb, java.lang.Object key)
           
 long getMaxRetryMillis()
           
 IRule getRule()
           
 void setMaxRetryMillis(long maxRetryMillis)
           
 void setRule(IRule subRule)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetryRule

public RetryRule()

RetryRule

public RetryRule(IRule subRule)

RetryRule

public RetryRule(IRule subRule,
                 long maxRetryMillis)
Method Detail

setRule

public void setRule(IRule subRule)

getRule

public IRule getRule()

setMaxRetryMillis

public void setMaxRetryMillis(long maxRetryMillis)

getMaxRetryMillis

public long getMaxRetryMillis()

choose

public Server choose(BaseLoadBalancer lb,
                     java.lang.Object key)
Specified by:
choose in interface IRule