Class ExecutorServiceManagerImpl
java.lang.Object
org.exoplatform.social.common.service.impl.ExecutorServiceManagerImpl
- All Implemented Interfaces:
ExecutorServiceManager,org.picocontainer.Startable
public class ExecutorServiceManagerImpl
extends Object
implements ExecutorServiceManager, org.picocontainer.Startable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the thread name patter to usenewDefaultThreadPool(String name) Creates a new thread pool using the default thread pool profile.Creates a new daemon thread with the given name.newThreadPool(String name, ThreadPoolConfig config) voidsetThreadNamePattern(String pattern) Sets the thread name pattern used for creating the full thread name.voidstart()voidstop()
-
Constructor Details
-
ExecutorServiceManagerImpl
public ExecutorServiceManagerImpl()
-
-
Method Details
-
setThreadNamePattern
Description copied from interface:ExecutorServiceManagerSets the thread name pattern used for creating the full thread name.- Specified by:
setThreadNamePatternin interfaceExecutorServiceManager- Parameters:
pattern- the pattern- Throws:
IllegalArgumentException- if the pattern is invalid.
-
getThreadNamePattern
Description copied from interface:ExecutorServiceManagerGets the thread name patter to use- Specified by:
getThreadNamePatternin interfaceExecutorServiceManager- Returns:
- the pattern
-
newThread
Description copied from interface:ExecutorServiceManagerCreates a new daemon thread with the given name.- Specified by:
newThreadin interfaceExecutorServiceManager- Parameters:
name- name which is appended to the thread namerunnable- a runnable to be executed by new thread instance- Returns:
- the created thread
-
newDefaultThreadPool
Description copied from interface:ExecutorServiceManagerCreates a new thread pool using the default thread pool profile.- Specified by:
newDefaultThreadPoolin interfaceExecutorServiceManager- Parameters:
name- name which is appended to the thread name- Returns:
- the created thread pool
-
getThreadPoolConfig
- Specified by:
getThreadPoolConfigin interfaceExecutorServiceManager
-
newThreadPool
- Specified by:
newThreadPoolin interfaceExecutorServiceManager
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-