Class NettyIoExecutors


  • public final class NettyIoExecutors
    extends java.lang.Object
    A static factory to create or convert to NettyIoExecutor.
    • Method Detail

      • createIoExecutor

        public static EventLoopAwareNettyIoExecutor createIoExecutor​(java.util.concurrent.ThreadFactory threadFactory)
        Create a new NettyIoExecutor with the default number of ioThreads.
        Parameters:
        threadFactory - the ThreadFactory to use.
        Returns:
        The created IoExecutor
      • createIoExecutor

        public static EventLoopAwareNettyIoExecutor createIoExecutor​(int ioThreads,
                                                                     java.util.concurrent.ThreadFactory threadFactory)
        Create a new NettyIoExecutor.
        Parameters:
        ioThreads - number of threads.
        threadFactory - the ThreadFactory to use.
        Returns:
        The created IoExecutor
      • createEventLoopGroup

        public static io.netty.channel.EventLoopGroup createEventLoopGroup​(int ioThreads,
                                                                           java.util.concurrent.ThreadFactory threadFactory)
        Create a new EventLoopGroup.
        Parameters:
        ioThreads - number of threads
        threadFactory - the ThreadFactory to use.
        Returns:
        The created IoExecutor
      • fromNettyEventLoop

        public static NettyIoExecutor fromNettyEventLoop​(io.netty.channel.EventLoop eventLoop)
        Creates a new instance of NettyIoExecutor using the passed EventLoop.
        Parameters:
        eventLoop - EventLoop to use to create a new NettyIoExecutor.
        Returns:
        New NettyIoExecutor using the passed EventLoop.
      • fromNettyEventLoopGroup

        public static NettyIoExecutor fromNettyEventLoopGroup​(io.netty.channel.EventLoopGroup eventLoopGroup)
        Creates a new instance of NettyIoExecutor using the passed EventLoopGroup.
        Parameters:
        eventLoopGroup - EventLoopGroup to use to create a new NettyIoExecutor.
        Returns:
        New NettyIoExecutor using the passed EventLoopGroup.