From 8b254ad25e690b9144b7cbb3074f7ee1e16df7c0 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Mon, 22 Sep 2025 18:12:31 +0200 Subject: [PATCH] Improve Javadoc for ConcurrencyThrottleSupport --- .../util/ConcurrencyThrottleSupport.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java b/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java index 2ebfd003a37..83e09b328c0 100644 --- a/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java +++ b/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java @@ -34,8 +34,8 @@ import org.apache.commons.logging.LogFactory; * appropriate points of its workflow. Note that {@code afterAccess} * should usually be called in a {@code finally} block! * - *
The default concurrency limit of this support class is -1 - * ("unbounded concurrency"). Subclasses may override this default; + *
The default concurrency limit of this support class is + * {@link #UNBOUNDED_CONCURRENCY}. Subclasses may override this default; * check the javadoc of the concrete class that you're using. * * @author Juergen Hoeller @@ -50,12 +50,19 @@ import org.apache.commons.logging.LogFactory; public abstract class ConcurrencyThrottleSupport implements Serializable { /** - * Permit any number of concurrent invocations: that is, don't throttle concurrency. + * Concurrency limit which signals unbounded concurrency: {@value}. + *
Setting the limit to this value permits any number of concurrent + * invocations: that is, concurrency will not be throttled. + * @see #NO_CONCURRENCY */ public static final int UNBOUNDED_CONCURRENCY = -1; /** - * Switch concurrency 'off': that is, don't allow any concurrent invocations. + * Concurrency limit which signals that concurrency throttling has been + * disabled: {@value}. + *
Setting the limit to this value prevents all invocations. + * @see #beforeAccess() + * @see #UNBOUNDED_CONCURRENCY */ public static final int NO_CONCURRENCY = 0;