| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.common.util.concurrent.ThreadFactoryBuilder
public final class ThreadFactoryBuilder
A ThreadFactory builder, providing any combination of these features:
setThreadFactory(Executors.defaultThreadFactory()).
| Constructor Summary | |
|---|---|
ThreadFactoryBuilder()
Creates a new ThreadFactory builder. | 
|
| Method Summary | |
|---|---|
 ThreadFactory | 
build()
Returns a new thread factory using the options supplied during the building process.  | 
 ThreadFactoryBuilder | 
setDaemon(boolean daemon)
Sets daemon or not for new threads created with this ThreadFactory.  | 
 ThreadFactoryBuilder | 
setNameFormat(String nameFormat)
Sets the naming format to use when naming threads ( Thread.setName(java.lang.String))
 which are created with this ThreadFactory. | 
 ThreadFactoryBuilder | 
setPriority(int priority)
Sets the priority for new threads created with this ThreadFactory.  | 
 ThreadFactoryBuilder | 
setThreadFactory(ThreadFactory backingThreadFactory)
Sets the backing ThreadFactory for new threads created with this
 ThreadFactory. | 
 ThreadFactoryBuilder | 
setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
Sets the Thread.UncaughtExceptionHandler for new threads created with this
 ThreadFactory. | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ThreadFactoryBuilder()
ThreadFactory builder.
| Method Detail | 
|---|
public ThreadFactoryBuilder setNameFormat(String nameFormat)
Thread.setName(java.lang.String))
 which are created with this ThreadFactory.
nameFormat - a String.format(String, Object...)-compatible
     format String, to which a unique integer (0, 1, etc.) will be supplied
     as the single parameter. This integer will be unique to the built
     instance of the ThreadFactory and will be assigned sequentially.
public ThreadFactoryBuilder setDaemon(boolean daemon)
daemon - whether or not new Threads created with this ThreadFactory
     will be daemon threads
public ThreadFactoryBuilder setPriority(int priority)
priority - the priority for new Threads created with this
     ThreadFactory
public ThreadFactoryBuilder setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
Thread.UncaughtExceptionHandler for new threads created with this
 ThreadFactory.
uncaughtExceptionHandler - the uncaught exception handler for new
     Threads created with this ThreadFactory
public ThreadFactoryBuilder setThreadFactory(ThreadFactory backingThreadFactory)
ThreadFactory for new threads created with this
 ThreadFactory. Threads will be created by invoking #newThread(Runnable) on
 this backing ThreadFactory.
backingThreadFactory - the backing ThreadFactory which will
     be delegated to during thread creation.
MoreExecutorspublic ThreadFactory build()
ThreadFactory
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||