Class ScheduledThreadPoolSupplier

java.lang.Object
io.helidon.common.configurable.ScheduledThreadPoolSupplier
All Implemented Interfaces:
RuntimeType.Api<io.helidon.common.configurable.ScheduledThreadPoolConfig>, Supplier<ScheduledExecutorService>

public final class ScheduledThreadPoolSupplier extends Object implements Supplier<ScheduledExecutorService>, RuntimeType.Api<io.helidon.common.configurable.ScheduledThreadPoolConfig>
Supplier of a custom scheduled thread pool. The returned thread pool supports Context propagation.
  • Method Details

    • builder

      public static io.helidon.common.configurable.ScheduledThreadPoolConfig.Builder builder()
      Create a new fluent API builder to build thread pool supplier.
      Returns:
      a builder instance
    • create

      public static ScheduledThreadPoolSupplier create(Config config)
      Load supplier from configuration.
      Parameters:
      config - config instance
      Returns:
      a new thread pool supplier configured from config
    • create

      public static ScheduledThreadPoolSupplier create()
      Create a new thread pool supplier with default configuration.
      Returns:
      a new thread pool supplier with default configuration
    • create

      public static ScheduledThreadPoolSupplier create(io.helidon.common.configurable.ScheduledThreadPoolConfig config)
      Create a new instance from programmatic configuration.
      Parameters:
      config - configuration
      Returns:
      a new thread pool supplier
    • create

      public static ScheduledThreadPoolSupplier create(Consumer<io.helidon.common.configurable.ScheduledThreadPoolConfig.Builder> consumer)
      Create a new instance customizing its configuration.
      Parameters:
      consumer - configuration consumer
      Returns:
      a new thread pool supplier
    • prototype

      public io.helidon.common.configurable.ScheduledThreadPoolConfig prototype()
      Description copied from interface: RuntimeType.Api
      The prototype as it was received when creating this runtime object instance.
      Specified by:
      prototype in interface RuntimeType.Api<io.helidon.common.configurable.ScheduledThreadPoolConfig>
      Returns:
      prototype object used to create this instance
    • corePoolSize

      public int corePoolSize()
      Returns size of core pool.
      Returns:
      size of core pool.
    • get

      Specified by:
      get in interface Supplier<ScheduledExecutorService>