Class ThreadFactoryBuilder


  • public class ThreadFactoryBuilder
    extends Object
    A builder for creating a thread factory. This allows changing the behavior of the created thread factory.
    • Constructor Detail

      • ThreadFactoryBuilder

        public ThreadFactoryBuilder()
    • 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.