Package io.servicetalk.concurrent.api
Class DefaultThreadFactory
- java.lang.Object
-
- io.servicetalk.concurrent.api.DefaultThreadFactory
-
- All Implemented Interfaces:
java.util.concurrent.ThreadFactory
public final class DefaultThreadFactory extends java.lang.Object implements java.util.concurrent.ThreadFactoryAThreadFactoryimplementation.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_NAME_PREFIX
-
Constructor Summary
Constructors Constructor Description DefaultThreadFactory()New instance that creates daemon threads withThread.NORM_PRIORITYpriority.DefaultThreadFactory(boolean daemon)New instance that creates threads withThread.NORM_PRIORITYpriority.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ThreadnewThread(java.lang.Runnable r)
-
-
-
Field Detail
-
DEFAULT_NAME_PREFIX
public static final java.lang.String DEFAULT_NAME_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultThreadFactory
public DefaultThreadFactory()
New instance that creates daemon threads withThread.NORM_PRIORITYpriority.
-
DefaultThreadFactory
public DefaultThreadFactory(boolean daemon)
New instance that creates threads withThread.NORM_PRIORITYpriority.- Parameters:
daemon-trueif the created threads should be daemons.
-
DefaultThreadFactory
public DefaultThreadFactory(int priority)
New instance that creates daemon threads.- Parameters:
priority- for the created threads.
-
DefaultThreadFactory
public DefaultThreadFactory(java.lang.String namePrefix)
Create a new instance.- Parameters:
namePrefix- for all created threads.
-
DefaultThreadFactory
public DefaultThreadFactory(boolean daemon, int priority)New instance.- Parameters:
daemon-trueif the created threads should be daemons.priority- for the created threads.
-
DefaultThreadFactory
public DefaultThreadFactory(java.lang.String namePrefix, boolean daemon, int priority)New instance.- Parameters:
namePrefix- for all created threads.daemon-trueif the created threads should be daemons.priority- for the created threads.
-
-