Package io.helidon.common.configurable
Class ScheduledThreadPoolConfig.BuilderBase.ScheduledThreadPoolConfigImpl
java.lang.Object
io.helidon.common.configurable.ScheduledThreadPoolConfig.BuilderBase.ScheduledThreadPoolConfigImpl
- All Implemented Interfaces:
Prototype.Api
,Prototype.Factory<ScheduledThreadPoolSupplier>
,ScheduledThreadPoolConfig
,Supplier<ScheduledThreadPoolSupplier>
- Enclosing class:
ScheduledThreadPoolConfig.BuilderBase<BUILDER extends ScheduledThreadPoolConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends ScheduledThreadPoolConfig>
protected static class ScheduledThreadPoolConfig.BuilderBase.ScheduledThreadPoolConfigImpl
extends Object
implements ScheduledThreadPoolConfig, Supplier<ScheduledThreadPoolSupplier>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.common.configurable.ScheduledThreadPoolConfig
ScheduledThreadPoolConfig.Builder, ScheduledThreadPoolConfig.BuilderBase<BUILDER extends ScheduledThreadPoolConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends ScheduledThreadPoolConfig> -
Field Summary
FieldsModifier 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-"). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a new instance of the runtime type from this config object.int
Core pool size of the thread pool executor.boolean
daemon()
Is daemon of the thread pool executor.boolean
get()
int
hashCode()
boolean
prestart()
Whether to prestart core threads in this thread pool executor.Name prefix for threads in this thread pool executor.toString()
boolean
When configured totrue
, an unbounded virtual executor service (project Loom) will be used.
-
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:
-
-
Constructor Details
-
ScheduledThreadPoolConfigImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
build
Description copied from interface:Prototype.Factory
Create a new instance of the runtime type from this config object.- Specified by:
build
in interfacePrototype.Factory<ScheduledThreadPoolSupplier>
- Returns:
- new configured runtime instance
-
get
- Specified by:
get
in interfaceSupplier<ScheduledThreadPoolSupplier>
-
virtualThreads
public boolean virtualThreads()Description copied from interface:ScheduledThreadPoolConfig
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!
- Specified by:
virtualThreads
in interfaceScheduledThreadPoolConfig
- Returns:
- whether to use virtual threads or not, defaults to
false
-
corePoolSize
public int corePoolSize()Description copied from interface:ScheduledThreadPoolConfig
Core pool size of the thread pool executor. Defaults to 16.- Specified by:
corePoolSize
in interfaceScheduledThreadPoolConfig
- Returns:
- corePoolSize see
ThreadPoolExecutor.getCorePoolSize()
-
daemon
public boolean daemon()Description copied from interface:ScheduledThreadPoolConfig
Is daemon of the thread pool executor. Defaults to true.- Specified by:
daemon
in interfaceScheduledThreadPoolConfig
- Returns:
- whether the threads are daemon threads
-
threadNamePrefix
Description copied from interface:ScheduledThreadPoolConfig
Name prefix for threads in this thread pool executor. Defaults to "helidon-".- Specified by:
threadNamePrefix
in interfaceScheduledThreadPoolConfig
- Returns:
- prefix of a thread name
-
prestart
public boolean prestart()Description copied from interface:ScheduledThreadPoolConfig
Whether to prestart core threads in this thread pool executor. Defaults to false.- Specified by:
prestart
in interfaceScheduledThreadPoolConfig
- Returns:
- whether to prestart the threads
-
toString
-
equals
-
hashCode
public int hashCode()
-