public interface ExecutorServiceFactory extends VertxServiceProvider
ExecutorService
.Modifier and Type | Field and Description |
---|---|
static ExecutorServiceFactory |
INSTANCE
Default instance that delegates to
Executors.newFixedThreadPool(int, ThreadFactory) |
Modifier and Type | Method and Description |
---|---|
ExecutorService |
createExecutor(ThreadFactory threadFactory,
Integer concurrency,
Integer maxConcurrency)
Create an ExecutorService
|
default void |
init(io.vertx.core.impl.VertxBuilder builder)
Let the provider initialize the Vert.x builder.
|
static final ExecutorServiceFactory INSTANCE
Executors.newFixedThreadPool(int, ThreadFactory)
default void init(io.vertx.core.impl.VertxBuilder builder)
VertxServiceProvider
init
in interface VertxServiceProvider
builder
- the builderExecutorService createExecutor(ThreadFactory threadFactory, Integer concurrency, Integer maxConcurrency)
threadFactory
- A ThreadFactory
which must be used by the
created ExecutorService
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 than concurrency
or 0 which
indicates unspecified.ExecutorService
that can be used to run tasksCopyright © 2021 Eclipse. All rights reserved.