Package io.airlift.concurrent
Class Threads
java.lang.Object
io.airlift.concurrent.Threads
-
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadFactorydaemonThreadsNamed(String nameFormat) Creates aThreadFactorythat creates named daemon threads.static ThreadFactorythreadsNamed(String nameFormat) Creates aThreadFactorythat creates named threads using the specified naming format and passing current thread's context class loader.static ThreadFactoryvirtualThreadsNamed(String nameFormat) Creates aThreadFactorythat creates named virtual threads.
-
Method Details
-
threadsNamed
Creates aThreadFactorythat creates named threads using the specified naming format and passing current thread's context class loader.- 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
Creates aThreadFactorythat creates named daemon threads. using the specified naming format and passing current thread's context class loader.- Parameters:
nameFormat- seethreadsNamed(String)- Returns:
- the created ThreadFactory
-
virtualThreadsNamed
Creates aThreadFactorythat creates named virtual threads. using the specified naming format and passing current thread's context class loader.- Parameters:
nameFormat- seethreadsNamed(String)- Returns:
- the created ThreadFactory
-