Package com.wavefront.common
Class NamedThreadFactory
- java.lang.Object
-
- com.wavefront.common.NamedThreadFactory
-
- All Implemented Interfaces:
ThreadFactory
public class NamedThreadFactory extends Object implements ThreadFactory
Simple thread factory to be used with Executors.newScheduledThreadPool that allows assigning name prefixes to all pooled threads to simplify thread identification during troubleshooting. Created by vasily@wavefront.com on 3/16/17.
-
-
Constructor Summary
Constructors Constructor Description NamedThreadFactory(String threadNamePrefix)
-
-
-
Constructor Detail
-
NamedThreadFactory
public NamedThreadFactory(@NotNull String threadNamePrefix)
-
-
Method Detail
-
newThread
public Thread newThread(@NotNull Runnable r)
- Specified by:
newThreadin interfaceThreadFactory
-
-