Package io.helidon.common.configurable
Class ThreadPoolSupplier
- java.lang.Object
-
- io.helidon.common.configurable.ThreadPoolSupplier
-
- All Implemented Interfaces:
Supplier<ExecutorService>
public final class ThreadPoolSupplier extends Object implements Supplier<ExecutorService>
Supplier of a custom thread pool. The returned thread pool supportsContext
propagation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ThreadPoolSupplier.Builder
A fluent API builder forThreadPoolSupplier
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ThreadPoolSupplier.Builder
builder()
Create a new fluent API builder to build thread pool supplier.static ThreadPoolSupplier
create()
Create a new thread pool supplier with default configuration.static ThreadPoolSupplier
create(Config config)
Load supplier from configuration.ExecutorService
get()
-
-
-
Method Detail
-
builder
public static ThreadPoolSupplier.Builder builder()
Create a new fluent API builder to build thread pool supplier.- Returns:
- a builder instance
-
create
public static ThreadPoolSupplier create(Config config)
Load supplier from configuration.- Parameters:
config
- config instance- Returns:
- a new thread pool supplier configured from config
-
create
public static ThreadPoolSupplier create()
Create a new thread pool supplier with default configuration.- Returns:
- a new thread pool supplier with default configuration
-
get
public ExecutorService get()
- Specified by:
get
in interfaceSupplier<ExecutorService>
-
-