All Implemented Interfaces:
ParameterizedBuilder<NamedExecutorService>

public class FixedBuilder extends AbstractExecutorWithFactoryBuilder<NamedExecutorService>
A ParameterizedBuilder for constructing a NamedExecutorService wrapper that will construct a fixed thread pool executor.
Since:
21.12
Author:
rl 11.26.21
  • Field Details

  • Constructor Details

    • FixedBuilder

      public FixedBuilder()
  • Method Details

    • realize

      public NamedExecutorService realize(ParameterResolver resolver, ClassLoader loader, ParameterList listParameters)
      Description copied from interface: ParameterizedBuilder
      Realizes (creates if necessary) an instance of a object of type T, using the provided ParameterResolver to resolve values any referenced Parameters.
      Parameters:
      resolver - the ParameterResolver for resolving named Parameters
      loader - the ClassLoader for loading any necessary classes and if null the ClassLoader used to load the builder will be used instead
      listParameters - an optional ParameterList (may be null) to be used for realizing the instance, eg: used as constructor parameters
      Returns:
      an instance of T
    • setThreadCount

      @Injectable("thread-count") public void setThreadCount(Expression<Integer> threadCount)
      Set the number of threads to be used by this executor.
      Parameters:
      threadCount - the number of threads to be used by this executor
    • description

      protected String description(int cThreadCount, ThreadFactory factory)
      Creates the description for this executor.
      Parameters:
      cThreadCount - the configured thread count
      factory - the ThreadFactory, if any
      Returns:
      the description for this executor