Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util
Class DaemonThreadFactory

`java.lang.Object
com.tangosol.util.DaemonThreadFactory`

All Implemented Interfaces:
  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
`static DaemonThreadFactory` | `INSTANCE` A reuseable DaemonThreadFactory instance.
`protected AtomicInteger` | `m_cNameSuffix` The thread name counter.
`protected String` | `m_sNamePrefix` The prefix to use for unnammed threads produced by the factory.

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

Method Summary
`Thread` | `makeThread(ThreadGroup group, Runnable runnable, String sName)`
`Thread` | `newThread(Runnable r)` Constructs a new `Thread`.

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)

### newThread

    public Thread newThread(Runnable r)

  Constructs a new `Thread`. Implementations may also initialize priority, name, daemon status, `ThreadGroup`, etc.
  Specified by:
    `newThread` in interface `ThreadFactory`
  Parameters:
    `r` - a runnable to be executed by new thread instance
  Returns:
    constructed thread

Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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