Class WorkerThreadFactory

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

    public final class WorkerThreadFactory
    extends java.lang.Object
    implements java.util.concurrent.ThreadFactory
    A factory to create worker threads with a given name prefix.
    • Constructor Summary

      Constructors 
      Constructor Description
      WorkerThreadFactory​(java.lang.String namePrefix)
      Creates a new thread factory whose threads will have names using the specified prefix.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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

      • WorkerThreadFactory

        public WorkerThreadFactory​(java.lang.String namePrefix)
        Creates a new thread factory whose threads will have names using the specified prefix.
        Parameters:
        namePrefix - The prefix for the thread names, may be null or empty to derive the prefix from the caller's simple class name.
    • Method Detail

      • newThread

        public java.lang.Thread newThread​(java.lang.Runnable r)
        Specified by:
        newThread in interface java.util.concurrent.ThreadFactory