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> Prototype.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 Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
ScheduledThreadPoolSupplier
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconfig()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).int
Core pool size of the thread pool executor.corePoolSize
(int corePoolSize) Core pool size of the thread pool executor.boolean
daemon()
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 void
Handles providers and decorators.boolean
prestart()
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 void
Validates required properties.boolean
When 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, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
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
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.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:
- the virtual threads
-
corePoolSize
public int corePoolSize()Core pool size of the thread pool executor. Defaults to 16.- Returns:
- the core pool size
-
daemon
public boolean daemon()Is daemon of the thread pool executor. Defaults to true.- Returns:
- the daemon
-
threadNamePrefix
Name prefix for threads in this thread pool executor. Defaults to "helidon-".- Returns:
- the thread name prefix
-
prestart
public boolean prestart()Whether to prestart core threads in this thread pool executor. Defaults to false.- Returns:
- the prestart
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-