NamedThreadFactory (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.concurrent

## Class NamedThreadFactory

- java.lang.Object
- - org.apache.cassandra.concurrent.NamedThreadFactory

- All Implemented Interfaces:
    java.util.concurrent.ThreadFactory

      public class NamedThreadFactory
      extends java.lang.Object
      implements java.util.concurrent.ThreadFactory

  This class is an implementation of the ThreadFactory interface. This is useful to give Java threads meaningful names which is useful when using a tool like JConsole.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `id`
    `protected java.util.concurrent.atomic.AtomicInteger` | `n`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NamedThreadFactory(java.lang.String id)`
    `NamedThreadFactory(java.lang.String id, int priority)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Thread` | `newThread(java.lang.Runnable runnable)`

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

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

- - ### Field Detail

    - #### id

          protected final java.lang.String id

    - #### n

          protected final java.util.concurrent.atomic.AtomicInteger n

  - ### Constructor Detail

    - #### NamedThreadFactory

          public NamedThreadFactory(java.lang.String id)

    - #### NamedThreadFactory

          public NamedThreadFactory(java.lang.String id,
                                    int priority)

  - ### Method Detail

    - #### newThread

          public java.lang.Thread newThread(java.lang.Runnable runnable)

      Specified by:
        `newThread` in interface `java.util.concurrent.ThreadFactory`

Copyright © 2018 The Apache Software Foundation