public class EsExecutors extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PROCESSORS
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 ThreadFactory |
daemonThreadFactory(Settings settings,
String... names) |
static ThreadFactory |
daemonThreadFactory(Settings settings,
String namePrefix) |
static ThreadFactory |
daemonThreadFactory(String namePrefix) |
static EsThreadPoolExecutor |
newCached(long keepAliveTime,
TimeUnit unit,
ThreadFactory threadFactory) |
static EsThreadPoolExecutor |
newFixed(int size,
int queueCapacity,
ThreadFactory threadFactory) |
static EsThreadPoolExecutor |
newScaling(int min,
int max,
long keepAliveTime,
TimeUnit unit,
ThreadFactory threadFactory) |
static PrioritizedEsThreadPoolExecutor |
newSinglePrioritizing(ThreadFactory threadFactory) |
static String |
threadName(Settings settings,
String... names) |
static String |
threadName(Settings settings,
String namePrefix) |
public static final String PROCESSORS
public static int boundedNumberOfProcessors(Settings settings)
public static PrioritizedEsThreadPoolExecutor newSinglePrioritizing(ThreadFactory threadFactory)
public static EsThreadPoolExecutor newScaling(int min, int max, long keepAliveTime, TimeUnit unit, ThreadFactory threadFactory)
public static EsThreadPoolExecutor newCached(long keepAliveTime, TimeUnit unit, ThreadFactory threadFactory)
public static EsThreadPoolExecutor newFixed(int size, int queueCapacity, ThreadFactory threadFactory)
public static ThreadFactory daemonThreadFactory(Settings settings, String namePrefix)
public static ThreadFactory daemonThreadFactory(Settings settings, String... names)
public static ThreadFactory daemonThreadFactory(String namePrefix)
Copyright © 2009–2015. All rights reserved.