public class NamedThreadFactory extends Object implements ThreadFactory
ThreadFactory implementation that creates threads with a configurable name.
nameFormat parameter handed in to the
constructor will be used as a pattern
for String.format(String, Object...). The number of the thread
factory and the number of the created thread are handed in as parameters to
String.format(String, Object...); the number of the thread factory
is an int, the number of the thread is a long.| Constructor and Description |
|---|
NamedThreadFactory(String nameFormat)
Creates a new named thread factory with the given name format.
|
public NamedThreadFactory(String nameFormat)
nameFormat - The name formatpublic Thread newThread(Runnable runnable)
newThread in interface ThreadFactoryCopyright © 2026. All rights reserved.