Skip to content

Commit

Permalink
Deprecate throttle limit in TaskExecutorRepeatTemplate
Browse files Browse the repository at this point in the history
Resolves #2218
  • Loading branch information
fmbenhassine committed Oct 12, 2022
1 parent 157d7a3 commit 1ff04d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ public B taskExecutor(TaskExecutor taskExecutor) {
* 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();
Expand Down Expand Up @@ -280,6 +284,7 @@ protected TaskExecutor getTaskExecutor() {
return taskExecutor;
}

@Deprecated(since = "5.0", forRemoval = true)
protected int getThrottleLimit() {
return throttleLimit;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -43,6 +43,7 @@
* any given time, and each thread would have its own transaction).<br>
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
*
*/
public class TaskExecutorRepeatTemplate extends RepeatTemplate {
Expand All @@ -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;
}
Expand Down

0 comments on commit 1ff04d5

Please sign in to comment.