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 supportsContext
propagation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScheduledThreadPoolSupplier.Builder
A fluent API builder forScheduledThreadPoolSupplier
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ScheduledThreadPoolSupplier.Builder
builder()
Create a new fluent API builder to build thread pool supplier.int
corePoolSize()
Returns size of core pool.static ScheduledThreadPoolSupplier
create()
Create a new thread pool supplier with default configuration.static ScheduledThreadPoolSupplier
create(Config config)
Load supplier from configuration.ScheduledExecutorService
get()
-
-
-
Method Detail
-
builder
public static ScheduledThreadPoolSupplier.Builder builder()
Create a new fluent API builder to build thread pool supplier.- Returns:
- a builder instance
-
create
public static ScheduledThreadPoolSupplier create(Config config)
Load supplier from configuration.- Parameters:
config
- config instance- Returns:
- a new thread pool supplier configured from config
-
create
public static ScheduledThreadPoolSupplier 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
public ScheduledExecutorService get()
- Specified by:
get
in interfaceSupplier<ScheduledExecutorService>
-
-