de.caff.util.concurrent

## Class Exec.PrivilegedThreadFactory

- java.lang.Object
- - de.caff.util.concurrent.Exec.DefaultThreadFactory
  - - de.caff.util.concurrent.Exec.PrivilegedThreadFactory

- All Implemented Interfaces:
    java.util.concurrent.ThreadFactory
  Enclosing class:
    Exec

      static class Exec.PrivilegedThreadFactory
      extends Exec.DefaultThreadFactory

  Privileged thread factor. This follows `Executors#PrivilegedThreadFactory` closely to avoid unexpected behavior.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrivilegedThreadFactory(java.lang.String baseName)` Constructor.
    `PrivilegedThreadFactory(java.lang.String baseName, java.lang.ClassLoader classLoader)` Constructor allowing to set an individual class loader.

  - ### Method Summary

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

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

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

- - ### Constructor Detail

    - #### PrivilegedThreadFactory

          public PrivilegedThreadFactory(@NotNull
                                         java.lang.String baseName)

      Constructor.
      Parameters:
        `baseName` - basic name used for threads created by this factory

    - #### PrivilegedThreadFactory

          public PrivilegedThreadFactory(@NotNull
                                         java.lang.String baseName,
                                         @NotNull
                                         java.lang.ClassLoader classLoader)

      Constructor allowing to set an individual class loader.
      Parameters:
        `baseName` - basic name used for threads created by this factory
        `classLoader` - class loader to use for threads

  - ### Method Detail

    - #### newThread

          @NotNull
          public java.lang.Thread newThread(@NotNull
                                                     java.lang.Runnable r)

      Specified by:
        `newThread` in interface `java.util.concurrent.ThreadFactory`
      Overrides:
        `newThread` in class `Exec.DefaultThreadFactory`