public class ThreadFactoryImpl
extends java.lang.Object
implements java.util.concurrent.ThreadFactory
| Modifier and Type | Method and Description |
|---|---|
ThreadFactoryImpl |
daemon(boolean daemon)
Set the daemon state of the threads.
|
ThreadFactoryImpl |
exceptionHandler(java.lang.Thread.UncaughtExceptionHandler exceptionHandler)
Set the exception handler of the threads.
|
ThreadFactoryImpl |
name(java.lang.String name)
Set the name of the threads.
|
java.lang.Thread |
newThread(java.lang.Runnable r) |
static ThreadFactoryImpl |
of()
Create a new thread factory.
|
static ThreadFactoryImpl |
of(boolean daemon)
Create a new thread factory with a daemon state.
|
static ThreadFactoryImpl |
of(int priority)
Create a new thread factory with a priority.
|
static ThreadFactoryImpl |
of(java.lang.String name)
Create a new thread factory with a name.
|
static ThreadFactoryImpl |
of(java.lang.Thread.UncaughtExceptionHandler exceptionHandler)
Create a new thread factory with an exception handler.
|
ThreadFactoryImpl |
priority(int priority)
Set the priority of the threads.
|
public static ThreadFactoryImpl of()
public static ThreadFactoryImpl of(java.lang.String name)
name - The name of the threadspublic static ThreadFactoryImpl of(boolean daemon)
daemon - Whether the threads should be daemon threadspublic static ThreadFactoryImpl of(int priority)
priority - The priority of the threadspublic static ThreadFactoryImpl of(java.lang.Thread.UncaughtExceptionHandler exceptionHandler)
exceptionHandler - The exception handler for the threadspublic ThreadFactoryImpl name(java.lang.String name)
name - The name of the threadspublic ThreadFactoryImpl daemon(boolean daemon)
daemon - Whether the threads should be daemon threadspublic ThreadFactoryImpl priority(int priority)
priority - The priority of the threadspublic ThreadFactoryImpl exceptionHandler(java.lang.Thread.UncaughtExceptionHandler exceptionHandler)
exceptionHandler - The exception handler of the threadspublic java.lang.Thread newThread(@Nonnull
java.lang.Runnable r)
newThread in interface java.util.concurrent.ThreadFactory