public class DefaultThreadFactory extends Object implements ThreadFactory
Modifier and Type | Method and Description |
---|---|
static DefaultThreadFactory |
getInstance(String threadName) |
static DefaultThreadFactory |
getInstance(String threadName,
Integer priority)
Gets the single INSTANCE of DefaultThreadFactory.
|
String |
getThreadPoolName()
Gets the thread pool name.
|
Thread |
newThread(Runnable r) |
void |
setThreadName(String threadName)
Sets the thread name.
|
public static DefaultThreadFactory getInstance(String threadName)
public static DefaultThreadFactory getInstance(String threadName, Integer priority)
threadName
- the thread namepriority
- the prioritypublic String getThreadPoolName()
public Thread newThread(Runnable r)
newThread
in interface ThreadFactory
r
- ThreadFactory.newThread(java.lang.Runnable)
public void setThreadName(String threadName)
threadName
- the new thread nameCopyright © 2021. All rights reserved.