Package com.tangosol.util
Class DaemonThreadFactory
- java.lang.Object
 - 
- com.tangosol.util.DaemonThreadFactory
 
 
- 
- All Implemented Interfaces:
 ThreadFactory,ThreadFactory
public class DaemonThreadFactory extends Object implements ThreadFactory
DaemonThreadFactory is a ThreadFactory which produces daemon threads.- Since:
 - Coherence 3.6
 - Author:
 - mf 2010.05.12
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static DaemonThreadFactoryINSTANCEA reuseable DaemonThreadFactory instance.protected AtomicIntegerm_cNameSuffixThe thread name counter.protected Stringm_sNamePrefixThe prefix to use for unnammed threads produced by the factory. 
- 
Constructor Summary
Constructors Constructor Description DaemonThreadFactory()Construct a new DameonThreadFacotry.DaemonThreadFactory(String sPrefix)Construct a new DameonThreadFacotry. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThreadmakeThread(ThreadGroup group, Runnable runnable, String sName)Create a Thread with the specified group, runnable, and name.ThreadnewThread(Runnable r) 
 - 
 
- 
- 
Field Detail
- 
m_sNamePrefix
protected final String m_sNamePrefix
The prefix to use for unnammed threads produced by the factory. 
- 
m_cNameSuffix
protected final AtomicInteger m_cNameSuffix
The thread name counter. 
- 
INSTANCE
public static final DaemonThreadFactory INSTANCE
A reuseable DaemonThreadFactory instance. 
 - 
 
- 
Constructor Detail
- 
DaemonThreadFactory
public DaemonThreadFactory()
Construct a new DameonThreadFacotry. 
- 
DaemonThreadFactory
public DaemonThreadFactory(String sPrefix)
Construct a new DameonThreadFacotry.- Parameters:
 sPrefix- the prefix for unnamed threads
 
 - 
 
- 
Method Detail
- 
makeThread
public Thread makeThread(ThreadGroup group, Runnable runnable, String sName)
Create a Thread with the specified group, runnable, and name.- Specified by:
 makeThreadin interfaceThreadFactory- Parameters:
 group- (optional) the thread's thread grouprunnable- (optional) the thread's runnablesName- (optional) the thread's name- Returns:
 - a new thread using the specified parameters
 
 
- 
newThread
public Thread newThread(Runnable r)
- Specified by:
 newThreadin interfaceThreadFactory
 
 - 
 
 -