org.exoplatform.social.common.service.thread
Interface ThreadPoolFactory

All Known Implementing Classes:
DefaultThreadPoolFactory

public interface ThreadPoolFactory


Method Summary
 ExecutorService newCachedThreadPool(ThreadFactory threadFactory)
          Creates a new cached thread pool

The cached thread pool is a term from the JDK from the method Executors.newCachedThreadPool().

 ScheduledExecutorService newScheduledThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory)
          Create a scheduled thread pool using the given thread pool profile
 ExecutorService newThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory)
          Create a thread pool using the given thread pool profile
 

Method Detail

newCachedThreadPool

ExecutorService newCachedThreadPool(ThreadFactory threadFactory)
Creates a new cached thread pool

The cached thread pool is a term from the JDK from the method Executors.newCachedThreadPool(). Typically it will have no size limit (this is why it is handled separately

Parameters:
threadFactory - factory for creating threads
Returns:
the created thread pool

newThreadPool

ExecutorService newThreadPool(ThreadPoolConfig config,
                              ThreadFactory threadFactory)
Create a thread pool using the given thread pool profile

Parameters:
config - parameters of the thread pool
threadFactory - factory for creating threads
Returns:
the created thread pool

newScheduledThreadPool

ScheduledExecutorService newScheduledThreadPool(ThreadPoolConfig config,
                                                ThreadFactory threadFactory)
Create a scheduled thread pool using the given thread pool profile

Parameters:
config - parameters of the thread pool
threadFactory - factory for creating threads
Returns:
the created thread pool


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.