@Factory @Internal public class DefaultEventLoopGroupRegistry extends Object implements EventLoopGroupRegistry
| Constructor and Description |
|---|
DefaultEventLoopGroupRegistry(EventLoopGroupFactory eventLoopGroupFactory,
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() |
Optional<io.netty.channel.EventLoopGroup> |
getEventLoopGroup(String name)
Obtain a configured Event Loop Group from the registry.
|
Optional<EventLoopGroupConfiguration> |
getEventLoopGroupConfiguration(String name)
Obtain a configured Event Loop Group from the registry.
|
public DefaultEventLoopGroupRegistry(EventLoopGroupFactory eventLoopGroupFactory, @Named(value="netty") 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 EventLoopGroupRegistrypublic Optional<io.netty.channel.EventLoopGroup> getEventLoopGroup(@NonNull String name)
EventLoopGroupRegistrygetEventLoopGroup in interface EventLoopGroupRegistryname - The name of the grouppublic Optional<EventLoopGroupConfiguration> getEventLoopGroupConfiguration(@NonNull String name)
EventLoopGroupRegistrygetEventLoopGroupConfiguration in interface EventLoopGroupRegistryname - The name of the group