public class EsExecutors
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Setting<java.lang.Integer> |
PROCESSORS_SETTING
Settings key to manually set the number of available processors.
|
Modifier and Type | Method and Description |
---|---|
static int |
boundedNumberOfProcessors(Settings settings)
Returns the number of processors available but at most 32.
|
static java.util.concurrent.ThreadFactory |
daemonThreadFactory(Settings settings,
java.lang.String... names) |
static java.util.concurrent.ThreadFactory |
daemonThreadFactory(Settings settings,
java.lang.String namePrefix) |
static java.util.concurrent.ThreadFactory |
daemonThreadFactory(java.lang.String namePrefix) |
static java.util.concurrent.ExecutorService |
newDirectExecutorService()
Returns an
ExecutorService that executes submitted tasks on the current thread. |
static EsThreadPoolExecutor |
newFixed(java.lang.String name,
int size,
int queueCapacity,
java.util.concurrent.ThreadFactory threadFactory,
ThreadContext contextHolder) |
static EsThreadPoolExecutor |
newScaling(java.lang.String name,
int min,
int max,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.ThreadFactory threadFactory,
ThreadContext contextHolder) |
static PrioritizedEsThreadPoolExecutor |
newSinglePrioritizing(java.lang.String name,
java.util.concurrent.ThreadFactory threadFactory,
ThreadContext contextHolder,
java.util.concurrent.ScheduledExecutorService timer) |
static java.lang.String |
threadName(Settings settings,
java.lang.String... names) |
static java.lang.String |
threadName(Settings settings,
java.lang.String namePrefix) |
static java.lang.String |
threadName(java.lang.String nodeName,
java.lang.String namePrefix) |
public static final Setting<java.lang.Integer> PROCESSORS_SETTING
public static int boundedNumberOfProcessors(Settings settings)
public static PrioritizedEsThreadPoolExecutor newSinglePrioritizing(java.lang.String name, java.util.concurrent.ThreadFactory threadFactory, ThreadContext contextHolder, java.util.concurrent.ScheduledExecutorService timer)
public static EsThreadPoolExecutor newScaling(java.lang.String name, int min, int max, long keepAliveTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.ThreadFactory threadFactory, ThreadContext contextHolder)
public static EsThreadPoolExecutor newFixed(java.lang.String name, int size, int queueCapacity, java.util.concurrent.ThreadFactory threadFactory, ThreadContext contextHolder)
public static java.util.concurrent.ExecutorService newDirectExecutorService()
ExecutorService
that executes submitted tasks on the current thread. This executor service does not support being
shutdown.ExecutorService
that executes submitted tasks on the current threadpublic static java.lang.String threadName(Settings settings, java.lang.String... names)
public static java.lang.String threadName(Settings settings, java.lang.String namePrefix)
public static java.lang.String threadName(java.lang.String nodeName, java.lang.String namePrefix)
public static java.util.concurrent.ThreadFactory daemonThreadFactory(Settings settings, java.lang.String namePrefix)
public static java.util.concurrent.ThreadFactory daemonThreadFactory(Settings settings, java.lang.String... names)
public static java.util.concurrent.ThreadFactory daemonThreadFactory(java.lang.String namePrefix)