Class Threads

java.lang.Object
io.airlift.concurrent.Threads

public final class Threads extends Object
  • Method Details

    • threadsNamed

      public static ThreadFactory threadsNamed(String nameFormat)
      Creates a ThreadFactory that creates named threads using the specified naming format.
      Parameters:
      nameFormat - a String.format(String, Object...)-compatible format string, to which a string will be supplied as the single parameter. This string will be unique to this instance of the ThreadFactory and will be assigned sequentially.
      Returns:
      the created ThreadFactory
    • daemonThreadsNamed

      public static ThreadFactory daemonThreadsNamed(String nameFormat)
      Creates a ThreadFactory that creates named daemon threads. using the specified naming format.
      Parameters:
      nameFormat - see threadsNamed(String)
      Returns:
      the created ThreadFactory