Class ExponentialBackOffWithMaxRetries
- java.lang.Object
- 
- org.springframework.util.backoff.ExponentialBackOff
- 
- org.springframework.kafka.support.ExponentialBackOffWithMaxRetries
 
 
- 
- All Implemented Interfaces:
- org.springframework.util.backoff.BackOff
 
 public class ExponentialBackOffWithMaxRetries extends org.springframework.util.backoff.ExponentialBackOffSubclass ofExponentialBackOffthat allows the specification of the maximum number of retries rather than the maximum elapsed time.- Since:
- 2.7.3
- Author:
- Gary Russell
 
- 
- 
Constructor SummaryConstructors Constructor Description ExponentialBackOffWithMaxRetries(int maxRetries)Construct an instance that will calculate thesetMaxElapsedTime(long)from the maxRetries.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMaxRetries()Get the max retries.voidsetInitialInterval(long initialInterval)voidsetMaxElapsedTime(long maxElapsedTime)voidsetMaxInterval(long maxInterval)voidsetMultiplier(double multiplier)
 
- 
- 
- 
Constructor Detail- 
ExponentialBackOffWithMaxRetriespublic ExponentialBackOffWithMaxRetries(int maxRetries) Construct an instance that will calculate thesetMaxElapsedTime(long)from the maxRetries.- Parameters:
- maxRetries- the max retries.
 
 
- 
 - 
Method Detail- 
getMaxRetriespublic int getMaxRetries() Get the max retries.- Returns:
- the max retries.
 
 - 
setInitialIntervalpublic void setInitialInterval(long initialInterval) - Overrides:
- setInitialIntervalin class- org.springframework.util.backoff.ExponentialBackOff
 
 - 
setMultiplierpublic void setMultiplier(double multiplier) - Overrides:
- setMultiplierin class- org.springframework.util.backoff.ExponentialBackOff
 
 - 
setMaxIntervalpublic void setMaxInterval(long maxInterval) - Overrides:
- setMaxIntervalin class- org.springframework.util.backoff.ExponentialBackOff
 
 - 
setMaxElapsedTimepublic void setMaxElapsedTime(long maxElapsedTime) - Overrides:
- setMaxElapsedTimein class- org.springframework.util.backoff.ExponentialBackOff
 
 
- 
 
-