Interface ExecutorServiceManager
-
- All Known Implementing Classes:
ExecutorServiceManagerImpl
public interface ExecutorServiceManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetThreadNamePattern()Gets the thread name patter to useThreadPoolConfiggetThreadPoolConfig(String id)ExecutorServicenewDefaultThreadPool(String name)Creates a new thread pool using the default thread pool profile.ThreadnewThread(String name, Runnable runnable)Creates a new daemon thread with the given name.ExecutorServicenewThreadPool(String name, ThreadPoolConfig config)voidsetThreadNamePattern(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 namerunnable- 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:
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)
-
-