Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.util
Class DaemonThreadFactory

java.lang.Object
  extended by com.tangosol.util.DaemonThreadFactory

All Implemented Interfaces:
java.util.concurrent.ThreadFactory

public class DaemonThreadFactory
extends java.lang.Object
implements ThreadFactory

DaemonThreadFactory is a ThreadFactory which produces daemon threads.

Since:
Coherence 3.6
Author:
mf 2010.05.12

Field Summary
static DaemonThreadFactory INSTANCE
          A reuseable DaemonThreadFactory instance.
protected  java.util.concurrent.atomic.AtomicInteger m_cNameSuffix
          The thread name counter.
protected  java.lang.String m_sNamePrefix
          The prefix to use for unnammed threads produced by the factory.

 

Constructor Summary
DaemonThreadFactory()
          Construct a new DameonThreadFacotry.
DaemonThreadFactory(java.lang.String sPrefix)
          Construct a new DameonThreadFacotry.

 

Method Summary
 java.lang.Thread makeThread(java.lang.ThreadGroup group, java.lang.Runnable runnable, java.lang.String sName)
          Create a Thread with the specified group, runnable, and name.
 java.lang.Thread newThread(java.lang.Runnable r)
          

 

Field Detail

m_sNamePrefix

protected final java.lang.String m_sNamePrefix
The prefix to use for unnammed threads produced by the factory.

m_cNameSuffix

protected final java.util.concurrent.atomic.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(java.lang.String sPrefix)
Construct a new DameonThreadFacotry.
Parameters:
sPrefix - the prefix for unnamed threads

Method Detail

makeThread

public java.lang.Thread makeThread(java.lang.ThreadGroup group,
                                   java.lang.Runnable runnable,
                                   java.lang.String sName)
Create a Thread with the specified group, runnable, and name.
Parameters:
group - (optional) the thread's thread group
runnable - (optional) the thread's runnable
sName - (optional) the thread's name
Returns:
a new thread using the specified parameters

newThread

public java.lang.Thread newThread(java.lang.Runnable r)
Specified by:
newThread in interface java.util.concurrent.ThreadFactory

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.