Package io.servicetalk.concurrent.api
Class DefaultThreadFactory
java.lang.Object
io.servicetalk.concurrent.api.DefaultThreadFactory
- All Implemented Interfaces:
ThreadFactory
A
ThreadFactory
implementation.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The default prefix used for new thread names. -
Constructor Summary
ConstructorDescriptionNew instance that creates daemon threads withThread.NORM_PRIORITY
priority.DefaultThreadFactory
(boolean daemon) New instance that creates threads withThread.NORM_PRIORITY
priority.DefaultThreadFactory
(boolean daemon, int priority) New instance.DefaultThreadFactory
(int priority) New instance that creates daemon threads.DefaultThreadFactory
(String namePrefix) Create a new instance.DefaultThreadFactory
(String namePrefix, boolean daemon, int priority) New instance. -
Method Summary
-
Field Details
-
DEFAULT_NAME_PREFIX
The default prefix used for new thread names.- See Also:
-
-
Constructor Details
-
DefaultThreadFactory
public DefaultThreadFactory()New instance that creates daemon threads withThread.NORM_PRIORITY
priority. -
DefaultThreadFactory
public DefaultThreadFactory(boolean daemon) New instance that creates threads withThread.NORM_PRIORITY
priority.- Parameters:
daemon
-true
if the created threads should be daemons.
-
DefaultThreadFactory
public DefaultThreadFactory(int priority) New instance that creates daemon threads.- Parameters:
priority
- for the created threads.
-
DefaultThreadFactory
Create a new instance.- Parameters:
namePrefix
- for all created threads.
-
DefaultThreadFactory
public DefaultThreadFactory(boolean daemon, int priority) New instance.- Parameters:
daemon
-true
if the created threads should be daemons.priority
- for the created threads.
-
DefaultThreadFactory
New instance.- Parameters:
namePrefix
- for all created threads.daemon
-true
if the created threads should be daemons.priority
- for the created threads.
-
-
Method Details
-
newThread
- Specified by:
newThread
in interfaceThreadFactory
-
toString
-