Package io.helidon.common.configurable
Class ScheduledThreadPoolSupplier.Builder
java.lang.Object
io.helidon.common.configurable.ScheduledThreadPoolSupplier.Builder
- All Implemented Interfaces:
Builder<ScheduledThreadPoolSupplier.Builder,
,ScheduledThreadPoolSupplier> Supplier<ScheduledThreadPoolSupplier>
- Enclosing class:
- ScheduledThreadPoolSupplier
public static final class ScheduledThreadPoolSupplier.Builder
extends Object
implements Builder<ScheduledThreadPoolSupplier.Builder,ScheduledThreadPoolSupplier>
A fluent API builder for
ScheduledThreadPoolSupplier
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the instance from this builder.Load all properties for this thread pool executor from configuration.corePoolSize
(int corePoolSize) Core pool size of the thread pool executor.daemon
(boolean daemon) Is daemon of the thread pool executor.prestart
(boolean prestart) Whether to prestart core threads in this thread pool executor.threadNamePrefix
(String threadNamePrefix) Name prefix for threads in this thread pool executor.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<ScheduledThreadPoolSupplier.Builder,
ScheduledThreadPoolSupplier> - Returns:
- instance of the built type
-
corePoolSize
Core pool size of the thread pool executor.- Parameters:
corePoolSize
- seeThreadPoolExecutor.getCorePoolSize()
- Returns:
- updated builder instance
-
daemon
Is daemon of the thread pool executor.- Parameters:
daemon
- whether the threads are daemon threads- Returns:
- updated builder instance
-
threadNamePrefix
Name prefix for threads in this thread pool executor.- Parameters:
threadNamePrefix
- prefix of a thread name- Returns:
- updated builder instance
-
prestart
Whether to prestart core threads in this thread pool executor.- Parameters:
prestart
- whether to prestart the threads- Returns:
- updated builder instance
-
config
Load all properties for this thread pool executor from configuration. Expected keys:- core-pool-size
- is-daemon
- thread-name-prefix
- should-prestart
- Parameters:
config
- config located on the key of executor-service- Returns:
- updated builder instance
-