Package io.micronaut.http.netty.channel
Class NettyThreadFactory
java.lang.Object
io.micronaut.http.netty.channel.NettyThreadFactory
The Default thread factory the Netty
NioEventLoopGroup will use within Micronaut to
create threads.- Since:
- 1.0
- Author:
- graemerocher
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classWe only create one ThreadFactory singleton, but in order to get different names for different event loops, we need oneDefaultThreadFactoryfor each event loop. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated, for removal: This API element is subject to removal in a future version.static final StringName for Netty thread factory. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Pass the config instead, throughNettyThreadFactory(NettyGlobalConfiguration)NettyThreadFactory(NettyGlobalConfiguration configuration) Create a new netty ThreadFactory factory. -
Method Summary
Modifier and TypeMethodDescriptionstatic intDeprecated, for removal: This API element is subject to removal in a future version.protected ThreadFactoryConstructs the default thread factory used by the HTTP client.
-
Field Details
-
NAME
Name for Netty thread factory.- See Also:
-
DEFAULT_EVENT_LOOP_THREADS
Deprecated, for removal: This API element is subject to removal in a future version.Non-functional, replaced bygetDefaultEventLoopThreads().Constant with the default threads in the event loop.- See Also:
-
-
Constructor Details
-
NettyThreadFactory
Create a new netty ThreadFactory factory.- Parameters:
configuration- The configuration- Since:
- 4.4.0
-
NettyThreadFactory
Deprecated.Pass the config instead, throughNettyThreadFactory(NettyGlobalConfiguration)Create a new netty ThreadFactory factory.
-
-
Method Details
-
getDefaultEventLoopThreads
Deprecated, for removal: This API element is subject to removal in a future version.Get the default number of threads in the event loop.- Returns:
- The number of threads
-
nettyThreadFactory
Constructs the default thread factory used by the HTTP client.- Returns:
- The thread factory
-
getDefaultEventLoopThreads().