Class DaemonThreadFactory

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

    public final class DaemonThreadFactory
    extends java.lang.Object
    implements java.util.concurrent.ThreadFactory
    Creates new daemon Thread.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Thread newDaemonThread​(java.lang.Runnable r)  
      static java.lang.Thread newDaemonThread​(java.lang.Runnable r, java.lang.String name)  
      static java.util.concurrent.ThreadFactory newDaemonThreadFactory()
      Should be used by thread pools.
      static java.util.concurrent.ThreadFactory newDaemonThreadFactory​(java.lang.String name)  
      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
    • Method Detail

      • newThread

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

        public static java.util.concurrent.ThreadFactory newDaemonThreadFactory()
        Should be used by thread pools.
        Returns:
        new instance of ThreadFactory where each thread is daemon
      • newDaemonThreadFactory

        public static java.util.concurrent.ThreadFactory newDaemonThreadFactory​(java.lang.String name)
      • newDaemonThread

        public static java.lang.Thread newDaemonThread​(java.lang.Runnable r)
      • newDaemonThread

        public static java.lang.Thread newDaemonThread​(java.lang.Runnable r,
                                                       java.lang.String name)