net.sf.ehcache.util
Class NamedThreadFactory
java.lang.Object
net.sf.ehcache.util.NamedThreadFactory
- All Implemented Interfaces:
- ThreadFactory
public class NamedThreadFactory
- extends Object
- implements ThreadFactory
A ThreadFactory
that sets names to the threads created by this factory. Threads created by this factory
will take names in the form of the string namePrefix + " thread-" + threadNum
where threadNum is the
count of threads created by this type of factory.
- Author:
- Abhishek Sanoujam
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NamedThreadFactory
public NamedThreadFactory(String namePrefix)
- Constructor accepting the prefix of the threads that will be created by this
ThreadFactory
- Parameters:
namePrefix
- Prefix for names of threads
newThread
public Thread newThread(Runnable runnable)
- Returns a new thread using a name as specified by this factory
- Specified by:
newThread
in interface ThreadFactory
Copyright 2001-2014, Terracotta, Inc.