Polish Javadoc for BackOff implementations
This commit is contained in:
parent
9f6c0cb166
commit
a6c2d4595b
|
@ -22,9 +22,9 @@ package org.springframework.util.backoff;
|
|||
* max interval}, it is no longer increased. Stops retrying once the
|
||||
* {@link #setMaxElapsedTime(long) max elapsed time} has been reached.
|
||||
*
|
||||
* <p>Example: The default interval is {@value #DEFAULT_INITIAL_INTERVAL}ms, default
|
||||
* multiplier is {@value #DEFAULT_MULTIPLIER} and the default max interval is
|
||||
* {@value #DEFAULT_MAX_INTERVAL}. For 10 attempts the sequence will be
|
||||
* <p>Example: The default interval is {@value #DEFAULT_INITIAL_INTERVAL} ms,
|
||||
* the default multiplier is {@value #DEFAULT_MULTIPLIER}, and the default max
|
||||
* interval is {@value #DEFAULT_MAX_INTERVAL}. For 10 attempts the sequence will be
|
||||
* as follows:
|
||||
*
|
||||
* <pre>
|
||||
|
@ -42,8 +42,8 @@ package org.springframework.util.backoff;
|
|||
* 10 30000
|
||||
* </pre>
|
||||
*
|
||||
* Note that the default max elapsed time is {@link Long#MAX_VALUE}. Use
|
||||
* {@link #setMaxElapsedTime(long)} to limit the maximum number of time
|
||||
* <p>Note that the default max elapsed time is {@link Long#MAX_VALUE}. Use
|
||||
* {@link #setMaxElapsedTime(long)} to limit the maximum length of time
|
||||
* that an instance should accumulate before returning
|
||||
* {@link BackOffExecution#STOP}.
|
||||
*
|
||||
|
@ -93,9 +93,9 @@ public class ExponentialBackOff implements BackOff {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an instance.
|
||||
* Create an instance with the supplied settings.
|
||||
* @param initialInterval the initial interval in milliseconds
|
||||
* @param multiplier the multiplier (should be equal or higher to 1)
|
||||
* @param multiplier the multiplier (should be greater than or equal to 1)
|
||||
*/
|
||||
public ExponentialBackOff(long initialInterval, double multiplier) {
|
||||
checkMultiplier(multiplier);
|
||||
|
@ -118,7 +118,7 @@ public class ExponentialBackOff implements BackOff {
|
|||
}
|
||||
|
||||
/**
|
||||
* The value to multiply the current interval with for each retry attempt.
|
||||
* The value to multiply the current interval by for each retry attempt.
|
||||
*/
|
||||
public void setMultiplier(double multiplier) {
|
||||
checkMultiplier(multiplier);
|
||||
|
@ -126,7 +126,7 @@ public class ExponentialBackOff implements BackOff {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return the value to multiply the current interval with for each retry attempt.
|
||||
* Return the value to multiply the current interval by for each retry attempt.
|
||||
*/
|
||||
public double getMultiplier() {
|
||||
return multiplier;
|
||||
|
|
|
@ -50,7 +50,7 @@ public class FixedBackOff implements BackOff {
|
|||
/**
|
||||
* Create an instance.
|
||||
* @param interval the interval between two attempts
|
||||
* @param maxAttempts the maximal number of attempts
|
||||
* @param maxAttempts the maximum number of attempts
|
||||
*/
|
||||
public FixedBackOff(long interval, long maxAttempts) {
|
||||
this.interval = interval;
|
||||
|
@ -72,14 +72,14 @@ public class FixedBackOff implements BackOff {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the maximal number of attempts in milliseconds.
|
||||
* Set the maximum number of attempts in milliseconds.
|
||||
*/
|
||||
public void setMaxAttempts(long maxAttempts) {
|
||||
this.maxAttempts = maxAttempts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the maximal number of attempts in milliseconds.
|
||||
* Return the maximum number of attempts in milliseconds.
|
||||
*/
|
||||
public long getMaxAttempts() {
|
||||
return maxAttempts;
|
||||
|
|
Loading…
Reference in New Issue