java.lang.Object
org.apache.lucene.util.NamedThreadFactory
- All Implemented Interfaces:
ThreadFactory
A default
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()
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ThreadGroup
private static final String
private final String
private final AtomicInteger
private static final AtomicInteger
-
Constructor Summary
ConstructorsConstructorDescriptionNamedThreadFactory
(String threadNamePrefix) Creates a newNamedThreadFactory
instance -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
checkPrefix
(String prefix) private static ThreadGroup
Creates a newThread
-
Field Details
-
threadPoolNumber
-
group
-
threadNumber
-
NAME_PATTERN
- See Also:
-
threadNamePrefix
-
-
Constructor Details
-
NamedThreadFactory
Creates a newNamedThreadFactory
instance- Parameters:
threadNamePrefix
- the name prefix assigned to each thread created.
-
-
Method Details
-
getThreadGroup
-
checkPrefix
-
newThread
Creates a newThread
- Specified by:
newThread
in interfaceThreadFactory
- See Also:
-