If no backing thread factory is provided, a default backing thread factory is used as if by
calling setThreadFactory(Executors#defaultThreadFactory()).
| Modifier and Type | Field and Description |
|---|---|
| private ThreadFactory | |
| private Boolean | |
| private String | |
| private Integer | |
| private Thread. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ThreadFactory | Returns: the fully constructedThreadFactoryReturns a new thread factory using the options supplied during the building process. |
| private static ThreadFactory | |
| private static String | |
| public ThreadFactoryBuilder | Returns: this for the builder patternwhether or not new Threads created with this ThreadFactory will be daemon threads daemon)Sets daemon or not for new threads created with this ThreadFactory. |
| public ThreadFactoryBuilder | Returns: this for the builder patterna nameFormat)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. For
example, "rpc-pool-%d" will generate thread names like "rpc-pool-0", "rpc-pool-1", "rpc-pool-2", etc.Sets the naming format to use when naming threads ( |
| public ThreadFactoryBuilder | Returns: this for the builder patternthe priority for new Threads created with this ThreadFactory priority)Sets the priority for new threads created with this ThreadFactory. |
| public ThreadFactoryBuilder | Returns: this for the builder patternthe backing backingThreadFactory)ThreadFactory which will be delegated to during
thread creation.Sets the backing |
| public ThreadFactoryBuilder | Returns: this for the builder patternthe uncaught exception handler for new Threads created with
this ThreadFactory uncaughtExceptionHandlerSets the |
| backingThreadFactory | back to summary |
|---|---|
| private ThreadFactory backingThreadFactory
| |
| daemon | back to summary |
|---|---|
| private Boolean daemon
| |
| nameFormat | back to summary |
|---|---|
| private String nameFormat
| |
| priority | back to summary |
|---|---|
| private Integer priority
| |
| uncaughtExceptionHandler | back to summary |
|---|---|
| private Thread. | |
| ThreadFactoryBuilder | back to summary |
|---|---|
| public ThreadFactoryBuilder() Creates a new | |
| build | back to summary |
|---|---|
| public ThreadFactory build() Returns a new thread factory using the options supplied during the building process. After building, it is still possible to change the options used to build the ThreadFactory and/or build again. State is not shared amongst built instances.
| |
| doBuild | back to summary |
|---|---|
| private static ThreadFactory doBuild(ThreadFactoryBuilder builder) | |
| format | back to summary |
|---|---|
| private static String format(String format, Object... args) | |
| setDaemon | back to summary |
|---|---|
| public ThreadFactoryBuilder setDaemon(boolean daemon) Sets daemon or not for new threads created with this ThreadFactory.
| |
| setNameFormat | back to summary |
|---|---|
| public ThreadFactoryBuilder setNameFormat(String nameFormat) Sets the naming format to use when naming threads (
| |
| setPriority | back to summary |
|---|---|
| public ThreadFactoryBuilder setPriority(int priority) Sets the priority for new threads created with this ThreadFactory. Warning relying on the thread scheduler is discouraged.
| |
| setThreadFactory | back to summary |
|---|---|
| public ThreadFactoryBuilder setThreadFactory(ThreadFactory backingThreadFactory) Sets the backing
| |
| setUncaughtExceptionHandler | back to summary |
|---|---|
| public ThreadFactoryBuilder setUncaughtExceptionHandler(Thread. Sets the
| |