Top Description Fields Methods
io.vertx.core.spi

public Interface ExecutorServiceFactory

extends VertxServiceProvider
Imports
io.vertx.core.impl.VertxBuilder, java.util.concurrent.ExecutorService, .Executors, .ThreadFactory

The interface for a factory used to obtain an external ExecutorService.
Author
Gordon Hutchison

Field Summary

Modifier and TypeField and Description
public static final ExecutorServiceFactory

Method Summary

Modifier and TypeMethod and Description
public ExecutorService

Returns:

an ExecutorService that can be used to run tasks
createExecutor
(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.
threadFactory
,
Integer
The target level of concurrency or 0 which indicates unspecified
concurrency
,
Integer
A hard limit to the level of concurrency required, should be greater than concurrency or 0 which indicates unspecified.
maxConcurrency
)

Create an ExecutorService

public default void
init(VertxBuilder
the builder
builder
)

Implements io.vertx.core.spi.VertxServiceProvider.init.

Let the provider initialize the Vert.x builder.

Field Detail

INSTANCEback to summary
public static final ExecutorServiceFactory INSTANCE

Default instance that delegates to Executors#newFixedThreadPool(int, ThreadFactory)

Method Detail

createExecutorback to summary
public ExecutorService createExecutor(ThreadFactory threadFactory, Integer concurrency, Integer maxConcurrency)

Create an ExecutorService

Parameters
threadFactory: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:Integer

The target level of concurrency or 0 which indicates unspecified

maxConcurrency:Integer

A hard limit to the level of concurrency required, should be greater than concurrency or 0 which indicates unspecified.

Returns:ExecutorService

an ExecutorService that can be used to run tasks

initback to summary
public default void init(VertxBuilder builder)

Implements io.vertx.core.spi.VertxServiceProvider.init.

Doc from io.vertx.core.spi.VertxServiceProvider.init.

Let the provider initialize the Vert.x builder.

Parameters
builder:VertxBuilder

the builder

Annotations
@Override