Class ImmutableThreadFactoryProvider
java.lang.Object
org.opendaylight.yangtools.util.concurrent.ThreadFactoryProvider
org.opendaylight.yangtools.util.concurrent.ImmutableThreadFactoryProvider
Deprecated.
Immutable implementation of
ThreadFactoryProvider
.
Use the builder to create immutable instances:
ImmutableThreadFactoryProvider.builder()
.
Use the static factory method to create immutable instances:
ImmutableThreadFactoryProvider.of()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Deprecated.Builds instances of typeImmutableThreadFactoryProvider
.static interface
Deprecated.static interface
Deprecated.static interface
Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Deprecated.Creates a builder forImmutableThreadFactoryProvider
.copyOf
(ThreadFactoryProvider instance) Deprecated.Creates an immutable copy of aThreadFactoryProvider
value.boolean
daemon()
Deprecated.Daemon or not for new threads created via this factory.boolean
Deprecated.This instance is equal to all instances ofImmutableThreadFactoryProvider
that have equal attribute values.int
hashCode()
Deprecated.Computes a hash code from attributes:namePrefix
,logger
,priority
,daemon
.logger()
Deprecated.Logger used to log uncaught exceptions from new threads created via this factory.Deprecated.Prefix for threads from this factory.Deprecated.Construct a new immutableThreadFactoryProvider
instance.priority()
Deprecated.Priority for new threads from this factory.toString()
Deprecated.Prints the immutable valueThreadFactoryProvider
with attribute values.withDaemon
(boolean value) Deprecated.Copy the current immutable object by setting a value for thedaemon
attribute.withLogger
(Logger value) Deprecated.Copy the current immutable object by setting a value for thelogger
attribute.withNamePrefix
(String value) Deprecated.Copy the current immutable object by setting a value for thenamePrefix
attribute.withPriority
(int value) Deprecated.Copy the current immutable object by setting a present value for the optionalpriority
attribute.withPriority
(Optional<Integer> optional) Deprecated.Copy the current immutable object by setting an optional value for thepriority
attribute.Methods inherited from class org.opendaylight.yangtools.util.concurrent.ThreadFactoryProvider
get
-
Method Details
-
namePrefix
Deprecated.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".- Specified by:
namePrefix
in classThreadFactoryProvider
-
logger
Deprecated.Logger used to log uncaught exceptions from new threads created via this factory.- Specified by:
logger
in classThreadFactoryProvider
-
priority
Deprecated.Priority for new threads from this factory.- Specified by:
priority
in classThreadFactoryProvider
-
daemon
public boolean daemon()Deprecated.Daemon or not for new threads created via this factory. NB: Defaults to true.- Overrides:
daemon
in classThreadFactoryProvider
-
withNamePrefix
Deprecated.Copy the current immutable object by setting a value for thenamePrefix
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for namePrefix- Returns:
- A modified copy or the
this
object
-
withLogger
Deprecated.Copy the current immutable object by setting a value for thelogger
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for logger- Returns:
- A modified copy or the
this
object
-
withPriority
Deprecated.Copy the current immutable object by setting a present value for the optionalpriority
attribute.- Parameters:
value
- The value for priority- Returns:
- A modified copy or
this
if not changed
-
withPriority
Deprecated.Copy the current immutable object by setting an optional value for thepriority
attribute. An equality check is used on inner value to prevent copying of the same value by returningthis
.- Parameters:
optional
- An optional value for priority- Returns:
- A modified copy or
this
if not changed
-
withDaemon
Deprecated.Copy the current immutable object by setting a value for thedaemon
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for daemon- Returns:
- A modified copy or the
this
object
-
equals
Deprecated.This instance is equal to all instances ofImmutableThreadFactoryProvider
that have equal attribute values. -
hashCode
public int hashCode()Deprecated.Computes a hash code from attributes:namePrefix
,logger
,priority
,daemon
. -
toString
Deprecated.Prints the immutable valueThreadFactoryProvider
with attribute values. -
of
public static ImmutableThreadFactoryProvider of(String namePrefix, Logger logger, Optional<Integer> priority) Deprecated.Construct a new immutableThreadFactoryProvider
instance.- Parameters:
namePrefix
- The value for thenamePrefix
attributelogger
- The value for thelogger
attributepriority
- The value for thepriority
attribute- Returns:
- An immutable ThreadFactoryProvider instance
-
copyOf
Deprecated.Creates an immutable copy of aThreadFactoryProvider
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable ThreadFactoryProvider instance
-
builder
Deprecated.Creates a builder forImmutableThreadFactoryProvider
.ImmutableThreadFactoryProvider.builder() .namePrefix(String) // required
namePrefix
.logger(org.slf4j.Logger) // requiredlogger
.priority(Optional<Integer>) // optionalpriority
.daemon(boolean) // optionaldaemon
.build();- Returns:
- A new ImmutableThreadFactoryProvider builder
-