public class ExecutorUtil extends Object
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 |
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
log |
Constructor and Description |
---|
ExecutorUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addThreadLocalProvider(ExecutorUtil.InheritableThreadLocalProvider provider) |
static boolean |
isSolrServerThread() |
static ExecutorService |
newMDCAwareCachedThreadPool(ThreadFactory threadFactory)
|
static ExecutorService |
newMDCAwareFixedThreadPool(int nThreads,
ThreadFactory threadFactory)
|
static ExecutorService |
newMDCAwareSingleThreadExecutor(ThreadFactory threadFactory)
|
static void |
shutdownAndAwaitTermination(ExecutorService pool) |
static void |
shutdownNowAndAwaitTermination(ExecutorService pool) |
public static void addThreadLocalProvider(ExecutorUtil.InheritableThreadLocalProvider provider)
public static void shutdownNowAndAwaitTermination(ExecutorService pool)
public static void shutdownAndAwaitTermination(ExecutorService pool)
public static ExecutorService newMDCAwareFixedThreadPool(int nThreads, ThreadFactory threadFactory)
public static ExecutorService newMDCAwareSingleThreadExecutor(ThreadFactory threadFactory)
public static ExecutorService newMDCAwareCachedThreadPool(ThreadFactory threadFactory)
public static boolean isSolrServerThread()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.