io.vertx.core.spi

## Interface ExecutorServiceFactory

- All Superinterfaces:
    VertxServiceProvider

      public interface ExecutorServiceFactory
      extends VertxServiceProvider

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ExecutorServiceFactory` | `INSTANCE` Default instance that delegates to `Executors.newFixedThreadPool(int, ThreadFactory)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    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.

- - ### Field Detail

    - #### INSTANCE

          static final ExecutorServiceFactory INSTANCE

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

  - ### Method Detail

    - #### init

          default void init(io.vertx.core.impl.VertxBuilder builder)

      Description copied from interface: `VertxServiceProvider`
      Let the provider initialize the Vert.x builder.
      Specified by:
        `init` in interface `VertxServiceProvider`
      Parameters:
        `builder` - the builder

    - #### createExecutor

          ExecutorService createExecutor(ThreadFactory threadFactory,
                                         Integer concurrency,
                                         Integer maxConcurrency)

      Create an ExecutorService
      Parameters:
        `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 unspecified
        `maxConcurrency` - A hard limit to the level of concurrency required, should be greater than `concurrency` or 0 which indicates unspecified.
      Returns:
        an `ExecutorService` that can be used to run tasks

Copyright © 2023 Eclipse. All rights reserved.