Skip to content

Commit a6c2d45

Browse files
committed
Polish Javadoc for BackOff implementations
1 parent 9f6c0cb commit a6c2d45

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

spring-core/src/main/java/org/springframework/util/backoff/ExponentialBackOff.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
* max interval}, it is no longer increased. Stops retrying once the
2323
* {@link #setMaxElapsedTime(long) max elapsed time} has been reached.
2424
*
25-
* <p>Example: The default interval is {@value #DEFAULT_INITIAL_INTERVAL}ms, default
26-
* multiplier is {@value #DEFAULT_MULTIPLIER} and the default max interval is
27-
* {@value #DEFAULT_MAX_INTERVAL}. For 10 attempts the sequence will be
25+
* <p>Example: The default interval is {@value #DEFAULT_INITIAL_INTERVAL} ms,
26+
* the default multiplier is {@value #DEFAULT_MULTIPLIER}, and the default max
27+
* interval is {@value #DEFAULT_MAX_INTERVAL}. For 10 attempts the sequence will be
2828
* as follows:
2929
*
3030
* <pre>
@@ -42,8 +42,8 @@
4242
* 10 30000
4343
* </pre>
4444
*
45-
* Note that the default max elapsed time is {@link Long#MAX_VALUE}. Use
46-
* {@link #setMaxElapsedTime(long)} to limit the maximum number of time
45+
* <p>Note that the default max elapsed time is {@link Long#MAX_VALUE}. Use
46+
* {@link #setMaxElapsedTime(long)} to limit the maximum length of time
4747
* that an instance should accumulate before returning
4848
* {@link BackOffExecution#STOP}.
4949
*
@@ -93,9 +93,9 @@ public ExponentialBackOff() {
9393
}
9494

9595
/**
96-
* Create an instance.
96+
* Create an instance with the supplied settings.
9797
* @param initialInterval the initial interval in milliseconds
98-
* @param multiplier the multiplier (should be equal or higher to 1)
98+
* @param multiplier the multiplier (should be greater than or equal to 1)
9999
*/
100100
public ExponentialBackOff(long initialInterval, double multiplier) {
101101
checkMultiplier(multiplier);
@@ -118,15 +118,15 @@ public long getInitialInterval() {
118118
}
119119

120120
/**
121-
* The value to multiply the current interval with for each retry attempt.
121+
* The value to multiply the current interval by for each retry attempt.
122122
*/
123123
public void setMultiplier(double multiplier) {
124124
checkMultiplier(multiplier);
125125
this.multiplier = multiplier;
126126
}
127127

128128
/**
129-
* Return the value to multiply the current interval with for each retry attempt.
129+
* Return the value to multiply the current interval by for each retry attempt.
130130
*/
131131
public double getMultiplier() {
132132
return multiplier;

spring-core/src/main/java/org/springframework/util/backoff/FixedBackOff.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public FixedBackOff() {
5050
/**
5151
* Create an instance.
5252
* @param interval the interval between two attempts
53-
* @param maxAttempts the maximal number of attempts
53+
* @param maxAttempts the maximum number of attempts
5454
*/
5555
public FixedBackOff(long interval, long maxAttempts) {
5656
this.interval = interval;
@@ -72,14 +72,14 @@ public long getInterval() {
7272
}
7373

7474
/**
75-
* Set the maximal number of attempts in milliseconds.
75+
* Set the maximum number of attempts in milliseconds.
7676
*/
7777
public void setMaxAttempts(long maxAttempts) {
7878
this.maxAttempts = maxAttempts;
7979
}
8080

8181
/**
82-
* Return the maximal number of attempts in milliseconds.
82+
* Return the maximum number of attempts in milliseconds.
8383
*/
8484
public long getMaxAttempts() {
8585
return maxAttempts;

0 commit comments

Comments
 (0)