org.elasticsearch.common.util.concurrent
Class EsExecutors

java.lang.Object
  extended by org.elasticsearch.common.util.concurrent.EsExecutors

public class EsExecutors
extends java.lang.Object


Method Summary
static java.util.concurrent.ThreadFactory daemonThreadFactory(Settings settings, java.lang.String namePrefix)
           
static java.util.concurrent.ThreadFactory daemonThreadFactory(java.lang.String namePrefix)
          A priority based thread factory, for all Thread priority constants: Thread.MIN_PRIORITY, Thread.NORM_PRIORITY, Thread.MAX_PRIORITY;

This factory is used instead of Executers.DefaultThreadFactory to allow manipulation of priority and thread owner name.

static java.util.concurrent.ExecutorService newCachedThreadPool(TimeValue keepAlive, java.util.concurrent.ThreadFactory threadFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newCachedThreadPool

public static java.util.concurrent.ExecutorService newCachedThreadPool(TimeValue keepAlive,
                                                                       java.util.concurrent.ThreadFactory threadFactory)

daemonThreadFactory

public static java.util.concurrent.ThreadFactory daemonThreadFactory(Settings settings,
                                                                     java.lang.String namePrefix)

daemonThreadFactory

public static java.util.concurrent.ThreadFactory daemonThreadFactory(java.lang.String namePrefix)
A priority based thread factory, for all Thread priority constants: Thread.MIN_PRIORITY, Thread.NORM_PRIORITY, Thread.MAX_PRIORITY;

This factory is used instead of Executers.DefaultThreadFactory to allow manipulation of priority and thread owner name.

Parameters:
namePrefix - a name prefix for this thread
Returns:
a thread factory based on given priority.