1
1
/*
2
- * Copyright 2012-2023 the original author or authors.
2
+ * Copyright 2012-2024 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.
@@ -47,16 +47,16 @@ public class SimpleAsyncTaskSchedulerBuilder {
47
47
48
48
private final Boolean virtualThreads ;
49
49
50
- private final Set <SimpleAsyncTaskSchedulerCustomizer > customizers ;
51
-
52
50
private final Duration taskTerminationTimeout ;
53
51
52
+ private final Set <SimpleAsyncTaskSchedulerCustomizer > customizers ;
53
+
54
54
public SimpleAsyncTaskSchedulerBuilder () {
55
55
this (null , null , null , null , null );
56
56
}
57
57
58
58
private SimpleAsyncTaskSchedulerBuilder (String threadNamePrefix , Integer concurrencyLimit , Boolean virtualThreads ,
59
- Set <SimpleAsyncTaskSchedulerCustomizer > taskSchedulerCustomizers , Duration taskTerminationTimeout ) {
59
+ Duration taskTerminationTimeout , Set <SimpleAsyncTaskSchedulerCustomizer > taskSchedulerCustomizers ) {
60
60
this .threadNamePrefix = threadNamePrefix ;
61
61
this .concurrencyLimit = concurrencyLimit ;
62
62
this .virtualThreads = virtualThreads ;
@@ -71,7 +71,7 @@ private SimpleAsyncTaskSchedulerBuilder(String threadNamePrefix, Integer concurr
71
71
*/
72
72
public SimpleAsyncTaskSchedulerBuilder threadNamePrefix (String threadNamePrefix ) {
73
73
return new SimpleAsyncTaskSchedulerBuilder (threadNamePrefix , this .concurrencyLimit , this .virtualThreads ,
74
- this .customizers , this .taskTerminationTimeout );
74
+ this .taskTerminationTimeout , this .customizers );
75
75
}
76
76
77
77
/**
@@ -81,7 +81,7 @@ public SimpleAsyncTaskSchedulerBuilder threadNamePrefix(String threadNamePrefix)
81
81
*/
82
82
public SimpleAsyncTaskSchedulerBuilder concurrencyLimit (Integer concurrencyLimit ) {
83
83
return new SimpleAsyncTaskSchedulerBuilder (this .threadNamePrefix , concurrencyLimit , this .virtualThreads ,
84
- this .customizers , this .taskTerminationTimeout );
84
+ this .taskTerminationTimeout , this .customizers );
85
85
}
86
86
87
87
/**
@@ -91,7 +91,7 @@ public SimpleAsyncTaskSchedulerBuilder concurrencyLimit(Integer concurrencyLimit
91
91
*/
92
92
public SimpleAsyncTaskSchedulerBuilder virtualThreads (Boolean virtualThreads ) {
93
93
return new SimpleAsyncTaskSchedulerBuilder (this .threadNamePrefix , this .concurrencyLimit , virtualThreads ,
94
- this .customizers , this .taskTerminationTimeout );
94
+ this .taskTerminationTimeout , this .customizers );
95
95
}
96
96
97
97
/**
@@ -102,7 +102,7 @@ public SimpleAsyncTaskSchedulerBuilder virtualThreads(Boolean virtualThreads) {
102
102
*/
103
103
public SimpleAsyncTaskSchedulerBuilder taskTerminationTimeout (Duration taskTerminationTimeout ) {
104
104
return new SimpleAsyncTaskSchedulerBuilder (this .threadNamePrefix , this .concurrencyLimit , this .virtualThreads ,
105
- this .customizers , taskTerminationTimeout );
105
+ taskTerminationTimeout , this .customizers );
106
106
}
107
107
108
108
/**
@@ -132,7 +132,7 @@ public SimpleAsyncTaskSchedulerBuilder customizers(
132
132
Iterable <? extends SimpleAsyncTaskSchedulerCustomizer > customizers ) {
133
133
Assert .notNull (customizers , "Customizers must not be null" );
134
134
return new SimpleAsyncTaskSchedulerBuilder (this .threadNamePrefix , this .concurrencyLimit , this .virtualThreads ,
135
- append (null , customizers ), this . taskTerminationTimeout );
135
+ this . taskTerminationTimeout , append (null , customizers ));
136
136
}
137
137
138
138
/**
@@ -160,7 +160,7 @@ public SimpleAsyncTaskSchedulerBuilder additionalCustomizers(
160
160
Iterable <? extends SimpleAsyncTaskSchedulerCustomizer > customizers ) {
161
161
Assert .notNull (customizers , "Customizers must not be null" );
162
162
return new SimpleAsyncTaskSchedulerBuilder (this .threadNamePrefix , this .concurrencyLimit , this .virtualThreads ,
163
- append (this .customizers , customizers ), this . taskTerminationTimeout );
163
+ this . taskTerminationTimeout , append (this .customizers , customizers ));
164
164
}
165
165
166
166
/**
0 commit comments