Package io.airlift.concurrent
Class Threads
- java.lang.Object
-
- io.airlift.concurrent.Threads
-
public final class Threads extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ThreadFactorydaemonThreadsNamed(String nameFormat)Creates aThreadFactorythat creates named daemon threads.static ThreadFactorythreadsNamed(String nameFormat)Creates aThreadFactorythat creates named threads using the specified naming format.
-
-
-
Method Detail
-
threadsNamed
public static ThreadFactory threadsNamed(String nameFormat)
Creates aThreadFactorythat creates named threads using the specified naming format.- Parameters:
nameFormat- aString.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 aThreadFactorythat creates named daemon threads. using the specified naming format.- Parameters:
nameFormat- seethreadsNamed(String)- Returns:
- the created ThreadFactory
-
-