Package software.amazon.awssdk.utils
Class ThreadFactoryBuilder
- java.lang.Object
-
- software.amazon.awssdk.utils.ThreadFactoryBuilder
-
public class ThreadFactoryBuilder extends Object
A builder for creating a thread factory. This allows changing the behavior of the created thread factory.
-
-
Constructor Summary
Constructors Constructor Description ThreadFactoryBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThreadFactory
build()
Create theThreadFactory
with the configuration currently applied to this builder.ThreadFactoryBuilder
daemonThreads(Boolean daemonThreads)
Whether the threads created by the factory should be daemon threads.ThreadFactoryBuilder
threadNamePrefix(String threadNamePrefix)
The name prefix for threads created by this thread factory.
-
-
-
Method Detail
-
threadNamePrefix
public ThreadFactoryBuilder threadNamePrefix(String threadNamePrefix)
The name prefix for threads created by this thread factory. The prefix will be appended with a number unique to the thread factory and a number unique to the thread. For example, "aws-java-sdk-thread" could become "aws-java-sdk-thread-3-4". By default, this is "aws-java-sdk-thread".
-
daemonThreads
public ThreadFactoryBuilder daemonThreads(Boolean daemonThreads)
Whether the threads created by the factory should be daemon threads. By default this is true - we shouldn't be holding up the customer's JVM shutdown unless we're absolutely sure we want to.
-
build
public ThreadFactory build()
Create theThreadFactory
with the configuration currently applied to this builder.
-
-