Details
-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
Description
There are many implementations of ELG [2], but RHDG only accepts Epoll and Nio. They have created a Java class that extends MultithreadEventLoopGroup and would like to use it instead of the default EpollEventLoopGroup of RHDG.
They obtain a static ELG for the application using the following piece of code:
~~~~~~~~~~`
public static EventLoopGroup buildEventLoopGroup(boolean useNative, int maxThreads) {
return useNative && EPOLL_IS_AVALILABLE
? new EpollEventLoopGroup(maxThreads, new DefaultThreadFactory(TF_EPOL_NAME))
: new NioEventLoopGroup(maxThreads, new DefaultThreadFactory(TF_NIO_NAME));
}
~~~~~~~~~~~
[1] https://github.com/infinispan/infinispan/pull/4326/commits/db37dd166443fb61b213b42dcef092f7c7bd9592#diff-20e536244923e1de980b74c0babed8ecR44
[2] https://netty.io/4.0/api/io/netty/channel/EventLoopGroup.html
The idea behind the buildEventLoopGroup method is that it returns just one NioEventLoopGroup that is shared by all the components of the application that have the boolean "useNative" to true.
Is this Feature enhancement possible ?