Package io.servicetalk.concurrent.api
Class DefaultThreadFactory
java.lang.Object
io.servicetalk.concurrent.api.DefaultThreadFactory
- All Implemented Interfaces:
ThreadFactory
A
ThreadFactory implementation.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default prefix used for new thread names. -
Constructor Summary
ConstructorsConstructorDescriptionNew 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(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_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
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
New instance.- Parameters:
namePrefix- for all created threads.daemon-trueif the created threads should be daemons.priority- for the created threads.
-
-
Method Details
-
newThread
- Specified by:
newThreadin interfaceThreadFactory
-
toString
-