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 intDefault core pool size (16).static final booleanDefault daemon status of the created threads (true).static final booleanDefault prestart status of threads (false).static final StringDefault thread name prefix ("helidon-"). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a new instance of the runtime type from this config object.intCore pool size of the thread pool executor.booleandaemon()Is daemon of the thread pool executor.booleanget()inthashCode()booleanprestart()Whether to prestart core threads in this thread pool executor.Name prefix for threads in this thread pool executor.toString()booleanWhen 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.FactoryCreate a new instance of the runtime type from this config object.- Specified by:
buildin interfacePrototype.Factory<ScheduledThreadPoolSupplier>- Returns:
- new configured runtime instance
-
get
- Specified by:
getin interfaceSupplier<ScheduledThreadPoolSupplier>
-
virtualThreads
public boolean virtualThreads()Description copied from interface:ScheduledThreadPoolConfigWhen 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:
virtualThreadsin interfaceScheduledThreadPoolConfig- Returns:
- whether to use virtual threads or not, defaults to
false
-
corePoolSize
public int corePoolSize()Description copied from interface:ScheduledThreadPoolConfigCore pool size of the thread pool executor. Defaults to 16.- Specified by:
corePoolSizein interfaceScheduledThreadPoolConfig- Returns:
- corePoolSize see
ThreadPoolExecutor.getCorePoolSize()
-
daemon
public boolean daemon()Description copied from interface:ScheduledThreadPoolConfigIs daemon of the thread pool executor. Defaults to true.- Specified by:
daemonin interfaceScheduledThreadPoolConfig- Returns:
- whether the threads are daemon threads
-
threadNamePrefix
Description copied from interface:ScheduledThreadPoolConfigName prefix for threads in this thread pool executor. Defaults to "helidon-".- Specified by:
threadNamePrefixin interfaceScheduledThreadPoolConfig- Returns:
- prefix of a thread name
-
prestart
public boolean prestart()Description copied from interface:ScheduledThreadPoolConfigWhether to prestart core threads in this thread pool executor. Defaults to false.- Specified by:
prestartin interfaceScheduledThreadPoolConfig- Returns:
- whether to prestart the threads
-
toString
-
equals
-
hashCode
public int hashCode()
-