org.apache.solr.common.util

## Class ExecutorUtil

- java.lang.Object
- - org.apache.solr.common.util.ExecutorUtil

-     public class ExecutorUtil
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `ExecutorUtil.InheritableThreadLocalProvider` Any class which wants to carry forward the threadlocal values to the threads run by threadpools must implement this interface and the implementation should be registered here
    `static class` | `ExecutorUtil.MDCAwareThreadPoolExecutor`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExecutorUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addThreadLocalProvider(ExecutorUtil.InheritableThreadLocalProvider provider)`
    `static boolean` | `isSolrServerThread()`
    `static ExecutorService` | `newMDCAwareCachedThreadPool(String name)` Create a cached thread pool using a named thread factory
    `static ExecutorService` | `newMDCAwareCachedThreadPool(ThreadFactory threadFactory)` See `Executors.newCachedThreadPool(ThreadFactory)`
    `static ExecutorService` | `newMDCAwareFixedThreadPool(int nThreads, ThreadFactory threadFactory)` See `Executors.newFixedThreadPool(int, ThreadFactory)`
    `static ExecutorService` | `newMDCAwareSingleThreadExecutor(ThreadFactory threadFactory)` See `Executors.newSingleThreadExecutor(ThreadFactory)`
    `static void` | `setServerThreadFlag(Boolean flag)`
    `static void` | `shutdownAndAwaitTermination(ExecutorService pool)`
    `static void` | `shutdownAndAwaitTerminationWithInterrupt(ExecutorService pool)` Deprecated.
    `static void` | `shutdownWithInterruptAndAwaitTermination(ExecutorService pool)` Deprecated.

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

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

- - ### Constructor Detail

    - #### ExecutorUtil

          public ExecutorUtil()

  - ### Method Detail

    - #### addThreadLocalProvider

          public static void addThreadLocalProvider(ExecutorUtil.InheritableThreadLocalProvider provider)

    - #### shutdownWithInterruptAndAwaitTermination

          @Deprecated
          public static void shutdownWithInterruptAndAwaitTermination(ExecutorService pool)

      Deprecated.

    - #### shutdownAndAwaitTerminationWithInterrupt

          @Deprecated
          public static void shutdownAndAwaitTerminationWithInterrupt(ExecutorService pool)

      Deprecated.

    - #### shutdownAndAwaitTermination

          public static void shutdownAndAwaitTermination(ExecutorService pool)

    - #### newMDCAwareFixedThreadPool

          public static ExecutorService newMDCAwareFixedThreadPool(int nThreads,
                                                                   ThreadFactory threadFactory)

      See `Executors.newFixedThreadPool(int, ThreadFactory)`

    - #### newMDCAwareSingleThreadExecutor

          public static ExecutorService newMDCAwareSingleThreadExecutor(ThreadFactory threadFactory)

      See `Executors.newSingleThreadExecutor(ThreadFactory)`

    - #### newMDCAwareCachedThreadPool

          public static ExecutorService newMDCAwareCachedThreadPool(String name)

      Create a cached thread pool using a named thread factory

    - #### newMDCAwareCachedThreadPool

          public static ExecutorService newMDCAwareCachedThreadPool(ThreadFactory threadFactory)

      See `Executors.newCachedThreadPool(ThreadFactory)`

    - #### isSolrServerThread

          public static boolean isSolrServerThread()

    - #### setServerThreadFlag

          public static void setServerThreadFlag(Boolean flag)

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.