Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


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)
          Constructs a new Thread.

 

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)
Constructs a new Thread. Implementations may also initialize priority, name, daemon status, ThreadGroup, etc.
Specified by:
newThread in interface java.util.concurrent.ThreadFactory
Parameters:
r - a runnable to be executed by new thread instance
Returns:
constructed thread

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


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