org.rrd4j.core

## Class RrdSyncThreadPool.DaemonThreadFactory

- java.lang.Object
- - org.rrd4j.core.RrdSyncThreadPool.DaemonThreadFactory

- All Implemented Interfaces:
    ThreadFactory
  Enclosing class:
    RrdSyncThreadPool

      static class RrdSyncThreadPool.DaemonThreadFactory
      extends Object
      implements ThreadFactory

  Daemon thread factory used by the monitor executors.

  This factory creates all new threads used by an Executor in the same ThreadGroup. If there is a SecurityManager, it uses the group of System.getSecurityManager(), else the group of the thread instantiating this DaemonThreadFactory. Each new thread is created as a daemon thread with priority Thread.NORM_PRIORITY. New threads have names accessible via Thread.getName() of "<pool-name> Pool [Thread-M]", where M is the sequence number of the thread created by this factory.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) ThreadGroup` | `group`
    `(package private) String` | `poolName`
    `(package private) AtomicInteger` | `threadNumber`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DaemonThreadFactory(String poolName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Thread` | `newThread(Runnable r)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### group

          final ThreadGroup group

    - #### poolName

          final String poolName

    - #### threadNumber

          final AtomicInteger threadNumber

  - ### Constructor Detail

    - #### DaemonThreadFactory

          DaemonThreadFactory(String poolName)

  - ### Method Detail

    - #### newThread

          public Thread newThread(Runnable r)

      Specified by:
        `newThread` in interface `ThreadFactory`