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 Details

    • ThreadFactoryBuilder

      public ThreadFactoryBuilder()
  • Method Details

    • 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 the ThreadFactory with the configuration currently applied to this builder.