Package io.helidon.common.configurable
Class ScheduledThreadPoolConfig.BuilderBase<BUILDER extends ScheduledThreadPoolConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ScheduledThreadPoolConfig>
java.lang.Object
io.helidon.common.configurable.ScheduledThreadPoolConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
- Direct Known Subclasses:
ScheduledThreadPoolConfig.Builder
- Enclosing interface:
ScheduledThreadPoolConfig
public abstract static class ScheduledThreadPoolConfig.BuilderBase<BUILDER extends ScheduledThreadPoolConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ScheduledThreadPoolConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
ScheduledThreadPoolConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfig()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).intCore pool size of the thread pool executor.corePoolSize(int corePoolSize) Core pool size of the thread pool executor.booleandaemon()Is daemon of the thread pool executor.daemon(boolean daemon) Is daemon of the thread pool executor.from(ScheduledThreadPoolConfig prototype) Update this builder from an existing prototype instance.from(ScheduledThreadPoolConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.protected voidHandles providers and decorators.booleanprestart()Whether to prestart core threads in this thread pool executor.prestart(boolean prestart) Whether to prestart core threads in this thread pool executor.Name prefix for threads in this thread pool executor.threadNamePrefix(String threadNamePrefix) Name prefix for threads in this thread pool executor.toString()protected voidValidates required properties.booleanWhen configured totrue, an unbounded virtual executor service (project Loom) will be used.virtualThreads(boolean virtualThreads) When configured totrue, an unbounded virtual executor service (project Loom) will be used.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends ScheduledThreadPoolConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ScheduledThreadPoolConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends ScheduledThreadPoolConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ScheduledThreadPoolConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
virtualThreads
When configured totrue, an unbounded virtual executor service (project Loom) will be used.If enabled, all other configuration options of this executor service are ignored!
- Parameters:
virtualThreads- whether to use virtual threads or not, defaults tofalse- Returns:
- updated builder instance
- See Also:
-
corePoolSize
Core pool size of the thread pool executor. Defaults to 16.- Parameters:
corePoolSize- corePoolSize seeThreadPoolExecutor.getCorePoolSize()- Returns:
- updated builder instance
- See Also:
-
daemon
Is daemon of the thread pool executor. Defaults to true.- Parameters:
daemon- whether the threads are daemon threads- Returns:
- updated builder instance
- See Also:
-
threadNamePrefix
Name prefix for threads in this thread pool executor. Defaults to "helidon-".- Parameters:
threadNamePrefix- prefix of a thread name- Returns:
- updated builder instance
- See Also:
-
prestart
Whether to prestart core threads in this thread pool executor. Defaults to false.- Parameters:
prestart- whether to prestart the threads- Returns:
- updated builder instance
- See Also:
-
virtualThreads
public boolean virtualThreads()When configured totrue, an unbounded virtual executor service (project Loom) will be used.If enabled, all other configuration options of this executor service are ignored!
- Returns:
- whether to use virtual threads or not, defaults to
false
-
corePoolSize
public int corePoolSize()Core pool size of the thread pool executor. Defaults to 16.- Returns:
- corePoolSize see
ThreadPoolExecutor.getCorePoolSize()
-
daemon
public boolean daemon()Is daemon of the thread pool executor. Defaults to true.- Returns:
- whether the threads are daemon threads
-
threadNamePrefix
Name prefix for threads in this thread pool executor. Defaults to "helidon-".- Returns:
- prefix of a thread name
-
prestart
public boolean prestart()Whether to prestart core threads in this thread pool executor. Defaults to false.- Returns:
- whether to prestart the threads
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
Configuration used to configure this instance.- Returns:
- config instance
-
config(io.helidon.config.Config)