Polish SimpleAsyncTaskExecutorBuilder

See gh-37436
pull/37441/head
Johnny Lim 1 year ago committed by Moritz Halbritter
parent 6094212217
commit 9cb89e3366

@ -55,11 +55,7 @@ public class SimpleAsyncTaskExecutorBuilder {
private final Set<SimpleAsyncTaskExecutorCustomizer> customizers; private final Set<SimpleAsyncTaskExecutorCustomizer> customizers;
public SimpleAsyncTaskExecutorBuilder() { public SimpleAsyncTaskExecutorBuilder() {
this.virtualThreads = null; this(null, null, null, null, null);
this.threadNamePrefix = null;
this.concurrencyLimit = null;
this.taskDecorator = null;
this.customizers = null;
} }
private SimpleAsyncTaskExecutorBuilder(Boolean virtualThreads, String threadNamePrefix, Integer concurrencyLimit, private SimpleAsyncTaskExecutorBuilder(Boolean virtualThreads, String threadNamePrefix, Integer concurrencyLimit,
@ -112,7 +108,7 @@ public class SimpleAsyncTaskExecutorBuilder {
} }
/** /**
* Set the {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that * Set the {@link SimpleAsyncTaskExecutorCustomizer customizers} that
* should be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied * should be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied
* in the order that they were added after builder configuration has been applied. * in the order that they were added after builder configuration has been applied.
* Setting this value will replace any previously configured customizers. * Setting this value will replace any previously configured customizers.
@ -126,13 +122,13 @@ public class SimpleAsyncTaskExecutorBuilder {
} }
/** /**
* Set the {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that * Set the {@link SimpleAsyncTaskExecutorCustomizer customizers} that
* should be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied * should be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied
* in the order that they were added after builder configuration has been applied. * in the order that they were added after builder configuration has been applied.
* Setting this value will replace any previously configured customizers. * Setting this value will replace any previously configured customizers.
* @param customizers the customizers to set * @param customizers the customizers to set
* @return a new builder instance * @return a new builder instance
* @see #additionalCustomizers(SimpleAsyncTaskExecutorCustomizer...) * @see #additionalCustomizers(Iterable)
*/ */
public SimpleAsyncTaskExecutorBuilder customizers( public SimpleAsyncTaskExecutorBuilder customizers(
Iterable<? extends SimpleAsyncTaskExecutorCustomizer> customizers) { Iterable<? extends SimpleAsyncTaskExecutorCustomizer> customizers) {
@ -142,7 +138,7 @@ public class SimpleAsyncTaskExecutorBuilder {
} }
/** /**
* Add {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that should * Add {@link SimpleAsyncTaskExecutorCustomizer customizers} that should
* be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the * be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the
* order that they were added after builder configuration has been applied. * order that they were added after builder configuration has been applied.
* @param customizers the customizers to add * @param customizers the customizers to add
@ -155,12 +151,12 @@ public class SimpleAsyncTaskExecutorBuilder {
} }
/** /**
* Add {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that should * Add {@link SimpleAsyncTaskExecutorCustomizer customizers} that should
* be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the * be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the
* order that they were added after builder configuration has been applied. * order that they were added after builder configuration has been applied.
* @param customizers the customizers to add * @param customizers the customizers to add
* @return a new builder instance * @return a new builder instance
* @see #customizers(SimpleAsyncTaskExecutorCustomizer...) * @see #customizers(Iterable)
*/ */
public SimpleAsyncTaskExecutorBuilder additionalCustomizers( public SimpleAsyncTaskExecutorBuilder additionalCustomizers(
Iterable<? extends SimpleAsyncTaskExecutorCustomizer> customizers) { Iterable<? extends SimpleAsyncTaskExecutorCustomizer> customizers) {

Loading…
Cancel
Save