Package org.apache.solr.common.util

## Class ExecutorUtil.MDCAwareThreadPoolExecutor

- java.lang.Object
- - java.util.concurrent.AbstractExecutorService
  - - java.util.concurrent.ThreadPoolExecutor
    - - org.apache.solr.common.util.ExecutorUtil.MDCAwareThreadPoolExecutor

All Implemented Interfaces:
  `Executor`, `ExecutorService`

Enclosing class:
  ExecutorUtil

    public static class ExecutorUtil.MDCAwareThreadPoolExecutor
    extends ThreadPoolExecutor

### Nested Class Summary

### Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor

`ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy`

### Field Summary

Fields
`static Runnable` `NOOP`

### Constructor Summary

Constructors
`MDCAwareThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, int keepAliveTime, TimeUnit timeUnit, BlockingQueue<Runnable> blockingQueue, SolrNamedThreadFactory httpShardExecutor, boolean enableSubmitterStackTrace)`
`MDCAwareThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)`
`MDCAwareThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler)`
`MDCAwareThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory)`
`MDCAwareThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, boolean enableSubmitterStackTrace, Runnable beforeExecuteTask)`
`MDCAwareThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, Runnable beforeExecuteTask)`
`MDCAwareThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)`
`MDCAwareThreadPoolExecutor​(int i, int maxValue, long l, TimeUnit timeUnit, BlockingQueue<Runnable> es, SolrNamedThreadFactory testExecutor, boolean b)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `beforeExecute​(Thread t, Runnable r)`
`void` `execute​(Runnable command)`

### Methods inherited from class java.util.concurrent.ThreadPoolExecutor

`afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toString`

### Methods inherited from class java.util.concurrent.AbstractExecutorService

`invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit`

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### NOOP

    public static final Runnable NOOP

### Constructor Detail

#### MDCAwareThreadPoolExecutor

    public MDCAwareThreadPoolExecutor​(int corePoolSize,
                                      int maximumPoolSize,
                                      long keepAliveTime,
                                      TimeUnit unit,
                                      BlockingQueue<Runnable> workQueue,
                                      ThreadFactory threadFactory,
                                      RejectedExecutionHandler handler)

#### MDCAwareThreadPoolExecutor

    public MDCAwareThreadPoolExecutor​(int corePoolSize,
                                      int maximumPoolSize,
                                      long keepAliveTime,
                                      TimeUnit unit,
                                      BlockingQueue<Runnable> workQueue)

#### MDCAwareThreadPoolExecutor

    public MDCAwareThreadPoolExecutor​(int corePoolSize,
                                      int maximumPoolSize,
                                      long keepAliveTime,
                                      TimeUnit unit,
                                      BlockingQueue<Runnable> workQueue,
                                      ThreadFactory threadFactory)

#### MDCAwareThreadPoolExecutor

    public MDCAwareThreadPoolExecutor​(int corePoolSize,
                                      int maximumPoolSize,
                                      long keepAliveTime,
                                      TimeUnit unit,
                                      BlockingQueue<Runnable> workQueue,
                                      ThreadFactory threadFactory,
                                      Runnable beforeExecuteTask)

#### MDCAwareThreadPoolExecutor

    public MDCAwareThreadPoolExecutor​(int corePoolSize,
                                      int maximumPoolSize,
                                      long keepAliveTime,
                                      TimeUnit unit,
                                      BlockingQueue<Runnable> workQueue,
                                      ThreadFactory threadFactory,
                                      boolean enableSubmitterStackTrace,
                                      Runnable beforeExecuteTask)

#### MDCAwareThreadPoolExecutor

    public MDCAwareThreadPoolExecutor​(int corePoolSize,
                                      int maximumPoolSize,
                                      long keepAliveTime,
                                      TimeUnit unit,
                                      BlockingQueue<Runnable> workQueue,
                                      RejectedExecutionHandler handler)

#### MDCAwareThreadPoolExecutor

    public MDCAwareThreadPoolExecutor​(int corePoolSize,
                                      int maximumPoolSize,
                                      int keepAliveTime,
                                      TimeUnit timeUnit,
                                      BlockingQueue<Runnable> blockingQueue,
                                      SolrNamedThreadFactory httpShardExecutor,
                                      boolean enableSubmitterStackTrace)

#### MDCAwareThreadPoolExecutor

    public MDCAwareThreadPoolExecutor​(int i,
                                      int maxValue,
                                      long l,
                                      TimeUnit timeUnit,
                                      BlockingQueue<Runnable> es,
                                      SolrNamedThreadFactory testExecutor,
                                      boolean b)

### Method Detail

#### beforeExecute

    protected void beforeExecute​(Thread t,
                                 Runnable r)

Overrides:
  `beforeExecute` in class `ThreadPoolExecutor`

#### execute

    public void execute​(Runnable command)

Specified by:
  `execute` in interface `Executor`
Overrides:
  `execute` in class `ThreadPoolExecutor`