Package io.helidon.common.configurable
Class ThreadPoolSupplier
java.lang.Object
io.helidon.common.configurable.ThreadPoolSupplier
- All Implemented Interfaces:
Supplier<ExecutorService>
Supplier of a custom thread pool.
The returned thread pool supports
Context
propagation.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadPoolSupplier.Builder
builder()
Create a new fluent API builder to build thread pool supplier.int
Returns size of core pool.static ThreadPoolSupplier
Load supplier from configuration.static ThreadPoolSupplier
Create a new thread pool supplier with default configuration and a given name.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 instancename
- thread pool name- Returns:
- a new thread pool supplier configured from config
-
create
Create a new thread pool supplier with default configuration and a given name.- Parameters:
name
- thread pool name- Returns:
- a new thread pool supplier with default configuration
-
get
- Specified by:
get
in interfaceSupplier<ExecutorService>
-
corePoolSize
public int corePoolSize()Returns size of core pool.- Returns:
- size of core pool.
-