Class Threads


  • public final class Threads
    extends Object
    Common utility methods for Threads.
    • Method Detail

      • newThreadFactory

        public static ThreadFactory newThreadFactory​(ThreadGroup group,
                                                     String nameTemplate,
                                                     boolean isDaemon)
        Creates a new thread factory which will create threads using the specified thread group, naming template, and daemon status.
        Parameters:
        group - The thread group, which may be null.
        nameTemplate - The thread name format string which may contain a "%d" format option which will be substituted with the thread count.
        isDaemon - Indicates whether or not threads should be daemon threads.
        Returns:
        The new thread factory.