Class ThreadFactoryProvider
java.lang.Object
org.opendaylight.yangtools.util.concurrent.ThreadFactoryProvider
- Direct Known Subclasses:
ImmutableThreadFactoryProvider
Builder for
ThreadFactory
. Easier to use than the
ThreadFactoryBuilder
, because it enforces setting all required
properties through a staged builder.- Author:
- Michael Vorburger.ch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
boolean
daemon()
Daemon or not for new threads created via this factory.get()
abstract Logger
logger()
Logger used to log uncaught exceptions from new threads created via this factory.abstract String
Prefix for threads from this factory.priority()
Priority for new threads from this factory.
-
Constructor Details
-
ThreadFactoryProvider
public ThreadFactoryProvider()
-
-
Method Details
-
builder
-
namePrefix
Prefix for threads from this factory. For example, "rpc-pool", to create "rpc-pool-1/2/3" named threads. Note that this is a prefix, not a format, so you pass just "rpc-pool" instead of e.g. "rpc-pool-%d". -
logger
Logger used to log uncaught exceptions from new threads created via this factory. -
priority
Priority for new threads from this factory. -
daemon
@Default public boolean daemon()Daemon or not for new threads created via this factory. NB: Defaults to true. -
get
-