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