Package io.helidon.common.configurable
Interface ScheduledThreadPoolConfig
- All Superinterfaces:
Prototype.Api
,Prototype.Factory<ScheduledThreadPoolSupplier>
- All Known Implementing Classes:
ScheduledThreadPoolConfig.BuilderBase.ScheduledThreadPoolConfigImpl
Interface generated from definition. Please add javadoc to the definition interface.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forScheduledThreadPoolSupplier
.static class
ScheduledThreadPoolConfig.BuilderBase<BUILDER extends ScheduledThreadPoolConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends ScheduledThreadPoolConfig> Fluent API builder base forScheduledThreadPoolSupplier
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default core pool size (16).static final boolean
Default daemon status of the created threads (true).static final boolean
Default prestart status of threads (false).static final String
Default thread name prefix ("helidon-"). -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a new fluent API builder to customize configuration.builder
(ScheduledThreadPoolConfig instance) Create a new fluent API builder from an existing instance.int
Core pool size of the thread pool executor.static ScheduledThreadPoolConfig
create()
Create a new instance with default values.static ScheduledThreadPoolConfig
Create a new instance from configuration.boolean
daemon()
Is daemon of the thread pool executor.boolean
prestart()
Whether to prestart core threads in this thread pool executor.Name prefix for threads in this thread pool executor.boolean
When configured totrue
, an unbounded virtual executor service (project Loom) will be used.Methods inherited from interface io.helidon.builder.api.Prototype.Factory
build
-
Field Details
-
DEFAULT_CORE_POOL_SIZE
static final int DEFAULT_CORE_POOL_SIZEDefault core pool size (16).- See Also:
-
DEFAULT_IS_DAEMON
static final boolean DEFAULT_IS_DAEMONDefault daemon status of the created threads (true).- See Also:
-
DEFAULT_THREAD_NAME_PREFIX
Default thread name prefix ("helidon-").- See Also:
-
DEFAULT_PRESTART
static final boolean DEFAULT_PRESTARTDefault prestart status of threads (false).- See Also:
-
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
virtualThreads
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
int corePoolSize()Core pool size of the thread pool executor. Defaults to 16.- Returns:
- corePoolSize see
ThreadPoolExecutor.getCorePoolSize()
-
daemon
boolean daemon()Is daemon of the thread pool executor. Defaults to true.- Returns:
- whether the threads are daemon threads
-
threadNamePrefix
String threadNamePrefix()Name prefix for threads in this thread pool executor. Defaults to "helidon-".- Returns:
- prefix of a thread name
-
prestart
boolean prestart()Whether to prestart core threads in this thread pool executor. Defaults to false.- Returns:
- whether to prestart the threads
-