File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
spring-context/src/main/java/org/springframework/scheduling/annotation
spring-core/src/main/java/org/springframework/util Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2021 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
40
40
public interface SchedulingConfigurer {
41
41
42
42
/**
43
- * Callback allowing a {@link org.springframework.scheduling.TaskScheduler
44
- * TaskScheduler} and specific {@link org.springframework.scheduling.config.Task Task}
45
- * instances to be registered against the given the {@link ScheduledTaskRegistrar}.
46
- * @param taskRegistrar the registrar to be configured.
43
+ * Callback allowing a {@link org.springframework.scheduling.TaskScheduler}
44
+ * and specific {@link org.springframework.scheduling.config.Task} instances
45
+ * to be registered against the given the {@link ScheduledTaskRegistrar}.
46
+ * @param taskRegistrar the registrar to be configured
47
47
*/
48
48
void configureTasks (ScheduledTaskRegistrar taskRegistrar );
49
49
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -69,7 +69,7 @@ public abstract class ConcurrencyThrottleSupport implements Serializable {
69
69
70
70
/**
71
71
* Set the maximum number of concurrent access attempts allowed.
72
- * -1 indicates unbounded concurrency.
72
+ * The default of -1 indicates no concurrency limit at all .
73
73
* <p>In principle, this limit can be changed at runtime,
74
74
* although it is generally designed as a config time setting.
75
75
* <p>NOTE: Do not switch between -1 and any concrete limit at runtime,
@@ -143,9 +143,10 @@ protected void beforeAccess() {
143
143
*/
144
144
protected void afterAccess () {
145
145
if (this .concurrencyLimit >= 0 ) {
146
+ boolean debug = logger .isDebugEnabled ();
146
147
synchronized (this .monitor ) {
147
148
this .concurrencyCount --;
148
- if (logger . isDebugEnabled () ) {
149
+ if (debug ) {
149
150
logger .debug ("Returning from throttle at concurrency count " + this .concurrencyCount );
150
151
}
151
152
this .monitor .notify ();
You can’t perform that action at this time.
0 commit comments