public class NamedThreadFactory
extends java.lang.Object
implements java.util.concurrent.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(java.lang.String threadNamePrefix)
Creates a new
NamedThreadFactory instance |
Modifier and Type | Method and Description |
---|---|
java.lang.Thread |
newThread(java.lang.Runnable r)
Creates a new
Thread |
public NamedThreadFactory(java.lang.String threadNamePrefix)
NamedThreadFactory
instancethreadNamePrefix
- the name prefix assigned to each thread created.Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.