Package io.helidon.common.configurable
Class ScheduledThreadPoolSupplier
java.lang.Object
io.helidon.common.configurable.ScheduledThreadPoolSupplier
- All Implemented Interfaces:
Supplier<ScheduledExecutorService>
public final class ScheduledThreadPoolSupplier
extends Object
implements Supplier<ScheduledExecutorService>
Supplier of a custom scheduled thread pool.
The returned thread pool supports
Context
propagation.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent API builder forScheduledThreadPoolSupplier
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a new fluent API builder to build thread pool supplier.int
Returns size of core pool.static ScheduledThreadPoolSupplier
create()
Create a new thread pool supplier with default configuration.static ScheduledThreadPoolSupplier
Load supplier from configuration.get()
-
Method Details
-
builder
Create a new fluent API builder to build thread pool supplier.- Returns:
- a builder instance
-
create
Load supplier from configuration.- Parameters:
config
- config instance- Returns:
- a new thread pool supplier configured from config
-
create
Create a new thread pool supplier with default configuration.- Returns:
- a new thread pool supplier with default configuration
-
corePoolSize
public int corePoolSize()Returns size of core pool.- Returns:
- size of core pool.
-
get
- Specified by:
get
in interfaceSupplier<ScheduledExecutorService>
-