From a6c2d4595ba4edf8f870f9410700ffcdcb375e61 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 28 Sep 2014 15:26:30 +0200 Subject: [PATCH] Polish Javadoc for BackOff implementations --- .../util/backoff/ExponentialBackOff.java | 18 +++++++++--------- .../util/backoff/FixedBackOff.java | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/util/backoff/ExponentialBackOff.java b/spring-core/src/main/java/org/springframework/util/backoff/ExponentialBackOff.java index 005d787d1b..b3bfa9c65d 100644 --- a/spring-core/src/main/java/org/springframework/util/backoff/ExponentialBackOff.java +++ b/spring-core/src/main/java/org/springframework/util/backoff/ExponentialBackOff.java @@ -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. * - *

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 + *

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: * *

@@ -42,8 +42,8 @@ package org.springframework.util.backoff;
  * 10             30000
  * 
* - * Note that the default max elapsed time is {@link Long#MAX_VALUE}. Use - * {@link #setMaxElapsedTime(long)} to limit the maximum number of time + *

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; diff --git a/spring-core/src/main/java/org/springframework/util/backoff/FixedBackOff.java b/spring-core/src/main/java/org/springframework/util/backoff/FixedBackOff.java index ec88d8d097..62566f701c 100644 --- a/spring-core/src/main/java/org/springframework/util/backoff/FixedBackOff.java +++ b/spring-core/src/main/java/org/springframework/util/backoff/FixedBackOff.java @@ -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;