org.exoplatform.social.common.service
Interface ExecutorServiceManager

All Known Implementing Classes:
ExecutorServiceManagerImpl

public interface ExecutorServiceManager


Method Summary
 String getThreadNamePattern()
          Gets the thread name patter to use
 ThreadPoolConfig getThreadPoolConfig(String id)
           
 ExecutorService newDefaultThreadPool(String name)
          Creates a new thread pool using the default thread pool profile.
 Thread newThread(String name, Runnable runnable)
          Creates a new daemon thread with the given name.
 ExecutorService newThreadPool(String name, ThreadPoolConfig config)
           
 void setThreadNamePattern(String pattern)
          Sets the thread name pattern used for creating the full thread name.
 

Method Detail

setThreadNamePattern

void setThreadNamePattern(String pattern)
                          throws IllegalArgumentException
Sets the thread name pattern used for creating the full thread name.

Parameters:
pattern - the pattern
Throws:
IllegalArgumentException - if the pattern is invalid.

getThreadNamePattern

String getThreadNamePattern()
Gets the thread name patter to use

Returns:
the pattern

newThread

Thread newThread(String name,
                 Runnable runnable)
Creates a new daemon thread with the given name.

Parameters:
name - name which is appended to the thread name
runnable - a runnable to be executed by new thread instance
Returns:
the created thread

newDefaultThreadPool

ExecutorService newDefaultThreadPool(String name)
Creates a new thread pool using the default thread pool profile.

Parameters:
source - the source object, usually it should be this passed in as parameter
name - name which is appended to the thread name
Returns:
the created thread pool

getThreadPoolConfig

ThreadPoolConfig getThreadPoolConfig(String id)

newThreadPool

ExecutorService newThreadPool(String name,
                              ThreadPoolConfig config)


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