Deprecate throttle limit in TaskExecutorRepeatTemplate

Resolves #2218
This commit is contained in:
Mahmoud Ben Hassine
2022-10-12 18:57:18 +02:00
parent 157d7a3a20
commit 1ff04d532d
2 changed files with 11 additions and 1 deletions

View File

@@ -199,7 +199,11 @@ public abstract class AbstractTaskletStepBuilder<B extends AbstractTaskletStepBu
* in the job repository for this step.
* @param throttleLimit maximum number of concurrent tasklet executions allowed
* @return this for fluent chaining
* @deprecated since 5.0, scheduled for removal in 6.0. Use a pooled
* {@link TaskExecutor} implemenation with a limited capacity of its task queue
* instead.
*/
@Deprecated(since = "5.0", forRemoval = true)
public B throttleLimit(int throttleLimit) {
this.throttleLimit = throttleLimit;
return self();
@@ -280,6 +284,7 @@ public abstract class AbstractTaskletStepBuilder<B extends AbstractTaskletStepBu
return taskExecutor;
}
@Deprecated(since = "5.0", forRemoval = true)
protected int getThrottleLimit() {
return throttleLimit;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,6 +43,7 @@ import org.springframework.util.Assert;
* any given time, and each thread would have its own transaction).<br>
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
*
*/
public class TaskExecutorRepeatTemplate extends RepeatTemplate {
@@ -68,7 +69,11 @@ public class TaskExecutorRepeatTemplate extends RepeatTemplate {
* being reached (so make the core pool size larger than the throttle limit if
* possible).
* @param throttleLimit the throttleLimit to set.
* @deprecated since 5.0, scheduled for removal in 6.0. Use a pooled
* {@link TaskExecutor} implemenation with a limited capacity of its task queue
* instead.
*/
@Deprecated(since = "5.0", forRemoval = true)
public void setThrottleLimit(int throttleLimit) {
this.throttleLimit = throttleLimit;
}