Class JavaThreadPoolFeature

All Implemented Interfaces:
TaskAdviceFeature, ThreadingFeature
Direct Known Subclasses:
JavaThreadPoolFeature.WithShutdown

@Feature
@Prefix("workers")
public abstract class JavaThreadPoolFeature
extends AbstractThreadingFeature.WithTaskAdvice
A ThreadingFeature that uses a Java ThreadPoolExecutor.
  • Constructor Details

    • JavaThreadPoolFeature

      public JavaThreadPoolFeature()
  • Method Details

    • corePoolSize

      @Parameter protected int corePoolSize()
    • maxPoolSize

      @Parameter protected int maxPoolSize()
    • keepAliveTime

      @Parameter protected java.time.Duration keepAliveTime()
    • queueCapacity

      @Parameter protected int queueCapacity()
    • workExecutorImplementation

      @Provision(singleton=true) protected java.util.concurrent.ExecutorService workExecutorImplementation()
      Overrides:
      workExecutorImplementation in class AbstractThreadingFeature
    • createQueue

      protected java.util.concurrent.BlockingQueue<java.lang.Runnable> createQueue()
    • createThreadFactory

      protected java.util.concurrent.ThreadFactory createThreadFactory()
    • threadGroup

      protected io.vavr.control.Option<java.lang.ThreadGroup> threadGroup()
    • createRejectedExecutionHandler

      protected io.vavr.control.Option<? extends java.util.concurrent.RejectedExecutionHandler> createRejectedExecutionHandler()