Package io.vertx.core.spi
Interface ExecutorServiceFactory
-
- All Superinterfaces:
VertxServiceProvider
public interface ExecutorServiceFactory extends VertxServiceProvider
The interface for a factory used to obtain an externalExecutorService
.- Author:
- Gordon Hutchison
-
-
Field Summary
Fields Modifier and Type Field Description static ExecutorServiceFactory
INSTANCE
Default instance that delegates toExecutors.newFixedThreadPool(int, ThreadFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ExecutorService
createExecutor(ThreadFactory threadFactory, Integer concurrency, Integer maxConcurrency)
Create an ExecutorServicedefault void
init(io.vertx.core.internal.VertxBootstrap builder)
Let the provider initialize the Vert.x builder.
-
-
-
Field Detail
-
INSTANCE
static final ExecutorServiceFactory INSTANCE
Default instance that delegates toExecutors.newFixedThreadPool(int, ThreadFactory)
-
-
Method Detail
-
init
default void init(io.vertx.core.internal.VertxBootstrap builder)
Description copied from interface:VertxServiceProvider
Let the provider initialize the Vert.x builder.- Specified by:
init
in interfaceVertxServiceProvider
- Parameters:
builder
- the builder
-
createExecutor
ExecutorService createExecutor(ThreadFactory threadFactory, Integer concurrency, Integer maxConcurrency)
Create an ExecutorService- Parameters:
threadFactory
- AThreadFactory
which must be used by the createdExecutorService
to create threads. Null indicates there is no requirement to use a specific factory.concurrency
- The target level of concurrency or 0 which indicates unspecifiedmaxConcurrency
- A hard limit to the level of concurrency required, should be greater thanconcurrency
or 0 which indicates unspecified.- Returns:
- an
ExecutorService
that can be used to run tasks
-
-