Package com.sodius.oslc.core.util
Class Threads
java.lang.Object
com.sodius.oslc.core.util.Threads
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
Modifier and TypeMethodDescriptionstatic ThreadFactoryReturns the factory to use for creating threads.static voidsetThreadFactory(ThreadFactory factory) Sets the factory to use for creating threads.
-
Method Details
-
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
Sets the factory to use for creating threads.- Parameters:
factory- a Thread Factory
-