public class NamedThreadFactory extends Object implements ThreadFactory
ThreadFactory
implementation that accepts the name prefix
of the created threads as a constructor argument. Otherwise, this factory
yields the same semantics as the thread factory returned by
Executors.defaultThreadFactory()
.Constructor and Description |
---|
NamedThreadFactory(String threadNamePrefix)
Creates a new
NamedThreadFactory instance |
public NamedThreadFactory(String threadNamePrefix)
NamedThreadFactory
instancethreadNamePrefix
- the name prefix assigned to each thread created.public Thread newThread(Runnable r)
Thread
newThread
in interface ThreadFactory
ThreadFactory.newThread(java.lang.Runnable)
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.