Package com.sodius.oslc.core.util
Class Threads
- java.lang.Object
-
- com.sodius.oslc.core.util.Threads
-
public class Threads extends Object
Central place to obtain a thread factory, when threads are needed to implement a service, and to override the default thread factory to use, when an application needs to control how threads are created.- Since:
- 3.3.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ThreadFactory
getThreadFactory()
Returns the factory to use for creating threads.static void
setThreadFactory(ThreadFactory factory)
Sets the factory to use for creating threads.
-
-
-
Method Detail
-
getThreadFactory
public static ThreadFactory getThreadFactory()
Returns the factory to use for creating threads. If no specific one was set withsetThreadFactory(ThreadFactory)
, returns the one provided byExecutors.defaultThreadFactory()
.- Returns:
- a thread factory
-
setThreadFactory
public static void setThreadFactory(ThreadFactory factory)
Sets the factory to use for creating threads.- Parameters:
factory
- a Thread Factory
-
-