public final class DefaultThreadFactory
extends java.lang.Object
implements java.util.concurrent.ThreadFactory
ThreadFactory
implementation.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_NAME_PREFIX |
Constructor and Description |
---|
DefaultThreadFactory()
New instance that creates daemon threads with
Thread.NORM_PRIORITY priority. |
DefaultThreadFactory(boolean daemon)
New instance that creates threads with
Thread.NORM_PRIORITY priority. |
DefaultThreadFactory(boolean daemon,
int priority)
New instance.
|
DefaultThreadFactory(int priority)
New instance that creates daemon threads.
|
DefaultThreadFactory(java.lang.String namePrefix)
Create a new instance.
|
DefaultThreadFactory(java.lang.String namePrefix,
boolean daemon,
int priority)
New instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Thread |
newThread(java.lang.Runnable r) |
public static final java.lang.String DEFAULT_NAME_PREFIX
public DefaultThreadFactory()
Thread.NORM_PRIORITY
priority.public DefaultThreadFactory(boolean daemon)
Thread.NORM_PRIORITY
priority.daemon
- true
if the created threads should be daemons.public DefaultThreadFactory(int priority)
priority
- for the created threads.public DefaultThreadFactory(java.lang.String namePrefix)
namePrefix
- for all created threads.public DefaultThreadFactory(boolean daemon, int priority)
daemon
- true
if the created threads should be daemons.priority
- for the created threads.public DefaultThreadFactory(java.lang.String namePrefix, boolean daemon, int priority)
namePrefix
- for all created threads.daemon
- true
if the created threads should be daemons.priority
- for the created threads.