Class ThreadFactoryProvider

java.lang.Object
org.opendaylight.yangtools.util.concurrent.ThreadFactoryProvider
Direct Known Subclasses:
ImmutableThreadFactoryProvider

@Immutable @Deprecated(since="14.0.16", forRemoval=true) public abstract class ThreadFactoryProvider extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Java provides more powerful ways of creating ThreadFactory via Thread.ofPlatform() and Thread.ofVirtual() builders, please use those instead.
Builder for ThreadFactory. Easier to use than Guava's ThreadFactoryBuilder, because it enforces setting all required properties through a staged builder.
Author:
Michael Vorburger.ch
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Daemon or not for new threads created via this factory.
    get()
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    abstract Logger
    Deprecated, for removal: This API element is subject to removal in a future version.
    Logger used to log uncaught exceptions from new threads created via this factory.
    abstract String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Prefix for threads from this factory.
    abstract Optional<Integer>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Priority for new threads from this factory.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThreadFactoryProvider

      public ThreadFactoryProvider()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • builder

      Deprecated, for removal: This API element is subject to removal in a future version.
    • namePrefix

      @Parameter public abstract String namePrefix()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Prefix for threads from this factory. For example, "rpc-pool", to create "rpc-pool-1/2/3" named threads. Note that this is a prefix, not a format, so you pass just "rpc-pool" instead of e.g. "rpc-pool-%d".
    • logger

      @Parameter public abstract Logger logger()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Logger used to log uncaught exceptions from new threads created via this factory.
    • priority

      @Parameter public abstract Optional<Integer> priority()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Priority for new threads from this factory.
    • daemon

      @Default public boolean daemon()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Daemon or not for new threads created via this factory. NB: Defaults to true.
    • get

      public ThreadFactory get()
      Deprecated, for removal: This API element is subject to removal in a future version.