public class MyThreadFactory extends Object implements ThreadFactory
| 构造器和说明 |
|---|
MyThreadFactory() |
MyThreadFactory(String threadNamePrefix) |
| 限定符和类型 | 方法和说明 |
|---|---|
Thread |
createThread(Runnable runnable) |
protected String |
getDefaultThreadNamePrefix() |
ThreadGroup |
getThreadGroup() |
String |
getThreadNamePrefix() |
int |
getThreadPriority() |
boolean |
isDaemon() |
Thread |
newThread(Runnable r) |
protected String |
nextThreadName() |
void |
setDaemon(boolean daemon) |
void |
setThreadGroup(ThreadGroup threadGroup) |
void |
setThreadGroupName(String name) |
void |
setThreadNamePrefix(String threadNamePrefix) |
void |
setThreadPriority(int threadPriority) |
public MyThreadFactory()
public MyThreadFactory(String threadNamePrefix)
public void setThreadNamePrefix(String threadNamePrefix)
public String getThreadNamePrefix()
public void setThreadPriority(int threadPriority)
public int getThreadPriority()
public void setDaemon(boolean daemon)
public boolean isDaemon()
public void setThreadGroupName(String name)
public void setThreadGroup(ThreadGroup threadGroup)
public ThreadGroup getThreadGroup()
protected String nextThreadName()
protected String getDefaultThreadNamePrefix()
public Thread newThread(Runnable r)
newThread 在接口中 ThreadFactoryCopyright © 2024. All rights reserved.