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 ExecutorServiceFactoryINSTANCEDefault instance that delegates toExecutors.newFixedThreadPool(int, ThreadFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ExecutorServicecreateExecutor(ThreadFactory threadFactory, Integer concurrency, Integer maxConcurrency)Create an ExecutorServicedefault voidinit(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:VertxServiceProviderLet the provider initialize the Vert.x builder.- Specified by:
initin interfaceVertxServiceProvider- Parameters:
builder- the builder
-
createExecutor
ExecutorService createExecutor(ThreadFactory threadFactory, Integer concurrency, Integer maxConcurrency)
Create an ExecutorService- Parameters:
threadFactory- AThreadFactorywhich must be used by the createdExecutorServiceto 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 thanconcurrencyor 0 which indicates unspecified.- Returns:
- an
ExecutorServicethat can be used to run tasks
-
-