org.apache.camel.util.concurrent
Class ExecutorServiceHelper

java.lang.Object
  extended by org.apache.camel.util.concurrent.ExecutorServiceHelper

public final class ExecutorServiceHelper
extends Object

Helper for ExecutorService to construct executors using a thread factory that create thread names with Camel prefix.

Version:
$Revision: 15552 $

Method Summary
static String getThreadName(String name)
          Creates a new thread name with the given prefix
static ExecutorService newCachedThreadPool(String name, boolean daemon)
           
static ExecutorService newFixedThreadPool(int poolSize, String name, boolean daemon)
           
static ScheduledExecutorService newScheduledThreadPool(int poolSize, String name, boolean daemon)
           
static ExecutorService newSingleThreadExecutor(String name, boolean daemon)
           
protected static int nextThreadCounter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getThreadName

public static String getThreadName(String name)
Creates a new thread name with the given prefix


nextThreadCounter

protected static int nextThreadCounter()

newScheduledThreadPool

public static ScheduledExecutorService newScheduledThreadPool(int poolSize,
                                                              String name,
                                                              boolean daemon)

newFixedThreadPool

public static ExecutorService newFixedThreadPool(int poolSize,
                                                 String name,
                                                 boolean daemon)

newSingleThreadExecutor

public static ExecutorService newSingleThreadExecutor(String name,
                                                      boolean daemon)

newCachedThreadPool

public static ExecutorService newCachedThreadPool(String name,
                                                  boolean daemon)


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.