Class QueueExecutor

All Implemented Interfaces:
Executor, ExecutorService, BlockingExecutor, BlockingExecutorService, BoundedQueueThreadPoolExecutorMBean, BoundedThreadPoolExecutorMBean, ThreadExecutorMBean, ThreadPoolExecutorMBean, ShutdownListenable

Deprecated.
An executor which uses a regular queue to hold tasks. The executor may be tuned at runtime in many ways.
  • Constructor Details

    • QueueExecutor

      public QueueExecutor(int coreThreads, int maxThreads, long keepAliveTime, TimeUnit keepAliveTimeUnit, Queue<Runnable> queue, ThreadFactory threadFactory, boolean blocking, Executor handoffExecutor, DirectExecutor taskExecutor)
      Deprecated.
      Create a new instance.
      Parameters:
      coreThreads - the number of threads to create before enqueueing tasks
      maxThreads - the maximum number of threads to create
      keepAliveTime - the amount of time that an idle thread should remain active
      keepAliveTimeUnit - the unit of time for keepAliveTime
      queue - the queue to use for tasks
      threadFactory - the thread factory to use for new threads
      blocking - true if the executor should block when the queue is full and no threads are available, false to use the handoff executor
      handoffExecutor - the executor which is called when blocking is disabled and a task cannot be accepted, or null to reject the task
      taskExecutor - the executor to use to execute tasks
    • QueueExecutor

      public QueueExecutor(int coreThreads, int maxThreads, long keepAliveTime, TimeUnit keepAliveTimeUnit, Queue<Runnable> queue, ThreadFactory threadFactory, boolean blocking, Executor handoffExecutor)
      Deprecated.
      Create a new instance.
      Parameters:
      coreThreads - the number of threads to create before enqueueing tasks
      maxThreads - the maximum number of threads to create
      keepAliveTime - the amount of time that an idle thread should remain active
      keepAliveTimeUnit - the unit of time for keepAliveTime
      queue - the queue to use for tasks
      threadFactory - the thread factory to use for new threads
      blocking - true if the executor should block when the queue is full and no threads are available, false to use the handoff executor
      handoffExecutor - the executor which is called when blocking is disabled and a task cannot be accepted, or null to reject the task
    • QueueExecutor

      public QueueExecutor(int coreThreads, int maxThreads, long keepAliveTime, TimeUnit keepAliveTimeUnit, int queueLength, ThreadFactory threadFactory, boolean blocking, Executor handoffExecutor)
      Deprecated.
      Create a new instance.
      Parameters:
      coreThreads - the number of threads to create before enqueueing tasks
      maxThreads - the maximum number of threads to create
      keepAliveTime - the amount of time that an idle thread should remain active
      keepAliveTimeUnit - the unit of time for keepAliveTime
      queueLength - the fixed queue length to use for tasks
      threadFactory - the thread factory to use for new threads
      blocking - true if the executor should block when the queue is full and no threads are available, false to use the handoff executor
      handoffExecutor - the executor which is called when blocking is disabled and a task cannot be accepted, or null to reject the task
  • Method Details