@Factory @Internal public class DefaultEventLoopGroupRegistry extends java.lang.Object implements EventLoopGroupRegistry
Constructor and Description |
---|
DefaultEventLoopGroupRegistry(EventLoopGroupFactory eventLoopGroupFactory,
java.util.concurrent.ThreadFactory threadFactory,
BeanLocator beanLocator)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected io.netty.channel.EventLoopGroup |
defaultEventLoopGroup()
Constructs an event loop group with default Configuration.
|
protected io.netty.channel.EventLoopGroup |
eventLoopGroup(EventLoopGroupConfiguration configuration)
Constructs an event loop group for each configuration.
|
io.netty.channel.EventLoopGroup |
getDefaultEventLoopGroup() |
java.util.Optional<io.netty.channel.EventLoopGroup> |
getEventLoopGroup(java.lang.String name)
Obtain a configured Event Loop Group from the registry.
|
java.util.Optional<EventLoopGroupConfiguration> |
getEventLoopGroupConfiguration(java.lang.String name)
Obtain a configured Event Loop Group from the registry.
|
public DefaultEventLoopGroupRegistry(EventLoopGroupFactory eventLoopGroupFactory, @Named(value="netty") java.util.concurrent.ThreadFactory threadFactory, BeanLocator beanLocator)
eventLoopGroupFactory
- The event loop group factorythreadFactory
- The thread factorybeanLocator
- The bean locator@EachBean(value=EventLoopGroupConfiguration.class) @Bean(preDestroy="shutdownGracefully") protected io.netty.channel.EventLoopGroup eventLoopGroup(EventLoopGroupConfiguration configuration)
configuration
- The configuration@Singleton @Requires(missingProperty="micronaut.netty.event-loops.default") @Primary @Bean(preDestroy="shutdownGracefully") protected io.netty.channel.EventLoopGroup defaultEventLoopGroup()
@NonNull public io.netty.channel.EventLoopGroup getDefaultEventLoopGroup()
getDefaultEventLoopGroup
in interface EventLoopGroupRegistry
public java.util.Optional<io.netty.channel.EventLoopGroup> getEventLoopGroup(@NonNull java.lang.String name)
EventLoopGroupRegistry
getEventLoopGroup
in interface EventLoopGroupRegistry
name
- The name of the grouppublic java.util.Optional<EventLoopGroupConfiguration> getEventLoopGroupConfiguration(@NonNull java.lang.String name)
EventLoopGroupRegistry
getEventLoopGroupConfiguration
in interface EventLoopGroupRegistry
name
- The name of the group