Package io.micronaut.scheduling.executor
Interface ExecutorConfiguration
-
- All Known Implementing Classes:
UserExecutorConfiguration
public interface ExecutorConfiguration- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPREFIXThe prefix used for configuration.static java.lang.StringPREFIX_CONSUMERThe prefix used for Scheduled task configuration.static java.lang.StringPREFIX_IOThe prefix used for I/O pool configuration.static java.lang.StringPREFIX_SCHEDULEDThe prefix used for Scheduled task configuration.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @Min(1L) java.lang.IntegergetCorePoolSize()default java.lang.StringgetName()@Min(1L) java.lang.IntegergetNumberOfThreads()@Min(1L) java.lang.IntegergetParallelism()java.util.Optional<java.lang.Class<? extends java.util.concurrent.ThreadFactory>>getThreadFactoryClass()ExecutorTypegetType()
-
-
-
Field Detail
-
PREFIX
static final java.lang.String PREFIX
The prefix used for configuration.- See Also:
- Constant Field Values
-
PREFIX_IO
static final java.lang.String PREFIX_IO
The prefix used for I/O pool configuration.- See Also:
- Constant Field Values
-
PREFIX_SCHEDULED
static final java.lang.String PREFIX_SCHEDULED
The prefix used for Scheduled task configuration.- See Also:
- Constant Field Values
-
PREFIX_CONSUMER
static final java.lang.String PREFIX_CONSUMER
The prefix used for Scheduled task configuration.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
@Nullable default java.lang.String getName()
- Returns:
- The name of the component
-
getType
ExecutorType getType()
- Returns:
- The
ExecutorType
-
getParallelism
@Min(1L) @Min(1L) java.lang.Integer getParallelism()
- Returns:
- The parallelism for
ExecutorType.WORK_STEALING
-
getNumberOfThreads
@Min(1L) @Min(1L) java.lang.Integer getNumberOfThreads()
- Returns:
- The number of threads for
ExecutorType.FIXED
-
getCorePoolSize
@Min(1L) @Min(1L) java.lang.Integer getCorePoolSize()
- Returns:
- The core pool size for
ExecutorType.SCHEDULED
-
getThreadFactoryClass
java.util.Optional<java.lang.Class<? extends java.util.concurrent.ThreadFactory>> getThreadFactoryClass()
- Returns:
- The class to use as the
ThreadFactory
-
-