Package com.tangosol.util
Class DaemonThreadFactory
java.lang.Object
com.tangosol.util.DaemonThreadFactory
- All Implemented Interfaces:
ThreadFactory
,ThreadFactory
DaemonThreadFactory is a ThreadFactory which produces daemon threads.
- Since:
- Coherence 3.6
- Author:
- mf 2010.05.12
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DaemonThreadFactory
A reuseable DaemonThreadFactory instance.protected final AtomicInteger
The thread name counter.protected final String
The prefix to use for unnammed threads produced by the factory. -
Constructor Summary
ConstructorDescriptionConstruct a new DameonThreadFacotry.DaemonThreadFactory
(String sPrefix) Construct a new DameonThreadFacotry. -
Method Summary
Modifier and TypeMethodDescriptionmakeThread
(ThreadGroup group, Runnable runnable, String sName) Create a Thread with the specified group, runnable, and name.
-
Field Details
-
m_sNamePrefix
The prefix to use for unnammed threads produced by the factory. -
m_cNameSuffix
The thread name counter. -
INSTANCE
A reuseable DaemonThreadFactory instance.
-
-
Constructor Details
-
DaemonThreadFactory
public DaemonThreadFactory()Construct a new DameonThreadFacotry. -
DaemonThreadFactory
Construct a new DameonThreadFacotry.- Parameters:
sPrefix
- the prefix for unnamed threads
-
-
Method Details
-
makeThread
Create a Thread with the specified group, runnable, and name.- Specified by:
makeThread
in 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
- Specified by:
newThread
in interfaceThreadFactory
-