Class DaemonThreadFactory
- java.lang.Object
-
- org.apache.maven.surefire.util.internal.DaemonThreadFactory
-
- All Implemented Interfaces:
java.util.concurrent.ThreadFactory
public final class DaemonThreadFactory extends java.lang.Object implements java.util.concurrent.ThreadFactoryCreates new daemon Thread.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classDaemonThreadFactory.NamedThreadFactory
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ThreadGroupgroupprivate java.lang.StringnamePrefixprivate static java.util.concurrent.atomic.AtomicIntegerPOOL_NUMBERprivate java.util.concurrent.atomic.AtomicIntegerthreadNumber
-
Constructor Summary
Constructors Modifier Constructor Description privateDaemonThreadFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.ThreadnewDaemonThread(java.lang.Runnable r)static java.lang.ThreadnewDaemonThread(java.lang.Runnable r, java.lang.String name)static java.util.concurrent.ThreadFactorynewDaemonThreadFactory()Should be used by thread pools.static java.util.concurrent.ThreadFactorynewDaemonThreadFactory(java.lang.String name)java.lang.ThreadnewThread(java.lang.Runnable r)
-
-
-
Method Detail
-
newThread
public java.lang.Thread newThread(java.lang.Runnable r)
- Specified by:
newThreadin interfacejava.util.concurrent.ThreadFactory
-
newDaemonThreadFactory
public static java.util.concurrent.ThreadFactory newDaemonThreadFactory()
Should be used by thread pools.- Returns:
- new instance of
ThreadFactorywhere eachthreadis 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)
-
-