Class WorkManagerImpl.WorkThreadPoolExecutor

  • All Implemented Interfaces:
    Executor, ExecutorService
    Enclosing class:
    WorkManagerImpl

    protected class WorkManagerImpl.WorkThreadPoolExecutor
    extends ThreadPoolExecutor
    A ThreadPoolExecutor that keeps available the list of running tasks.

    Completed tasks are passed to another queue.

    The scheduled queue and completed list are passed as arguments and can have different implementations (in-memory, persisted, etc).

    Since:
    5.6
    • Field Detail

      • queueId

        protected final String queueId
      • running

        protected final ConcurrentLinkedQueue<Work> running
        List of running Work instances, in order to be able to interrupt them if requested.
      • scheduledCount

        protected final io.dropwizard.metrics5.Counter scheduledCount
      • runningCount

        protected final io.dropwizard.metrics5.Counter runningCount
      • completedCount

        protected final io.dropwizard.metrics5.Counter completedCount
      • workTimer

        protected final io.dropwizard.metrics5.Timer workTimer
    • Constructor Detail

      • WorkThreadPoolExecutor

        protected WorkThreadPoolExecutor​(int corePoolSize,
                                         int maximumPoolSize,
                                         long keepAliveTime,
                                         TimeUnit unit,
                                         NuxeoBlockingQueue queue,
                                         ThreadFactory threadFactory)