Class MultithreadEventLoopGroup

    • Field Detail

      • DEFAULT_EVENT_LOOP_THREADS

        public static final int DEFAULT_EVENT_LOOP_THREADS
    • Constructor Detail

      • MultithreadEventLoopGroup

        public MultithreadEventLoopGroup​(IoHandlerFactory ioHandlerFactory)
        Create a new instance.
        Parameters:
        ioHandlerFactory - the IoHandlerFactory to use for creating new IoHandler instances that will handle the IO for the EventLoop.
      • MultithreadEventLoopGroup

        public MultithreadEventLoopGroup​(int nThreads,
                                         IoHandlerFactory ioHandlerFactory)
        Create a new instance.
        Parameters:
        nThreads - the number of threads that will be used by this instance.
        ioHandlerFactory - the IoHandlerFactory to use for creating new IoHandler instances that will handle the IO for the EventLoop.
      • MultithreadEventLoopGroup

        public MultithreadEventLoopGroup​(int nThreads,
                                         Executor executor,
                                         IoHandlerFactory ioHandlerFactory)
        Create a new instance.
        Parameters:
        nThreads - the number of threads that will be used by this instance.
        executor - the Executor to use, or null if the default should be used.
        ioHandlerFactory - the IoHandlerFactory to use for creating new IoHandler instances that will handle the IO for the EventLoop.
      • MultithreadEventLoopGroup

        public MultithreadEventLoopGroup​(int nThreads,
                                         ThreadFactory threadFactory,
                                         IoHandlerFactory ioHandlerFactory)
        Create a new instance.
        Parameters:
        nThreads - the number of threads that will be used by this instance.
        threadFactory - the ThreadFactory to use, or null if the default should be used.
        ioHandlerFactory - the IoHandlerFactory to use for creating new IoHandler instances that will handle the IO for the EventLoop.
      • MultithreadEventLoopGroup

        public MultithreadEventLoopGroup​(Executor executor,
                                         IoHandlerFactory ioHandlerFactory)
        Create a new instance.
        Parameters:
        executor - the Executor to use, or null if the default should be used.
        ioHandlerFactory - the IoHandlerFactory to use for creating new IoHandler instances that will handle the IO for the EventLoop.
      • MultithreadEventLoopGroup

        public MultithreadEventLoopGroup​(int nThreads,
                                         Executor executor,
                                         IoHandlerFactory ioHandlerFactory,
                                         int maxPendingTasks,
                                         RejectedExecutionHandler rejectedHandler)
        Create a new instance.
        Parameters:
        nThreads - the number of threads that will be used by this instance.
        executor - the Executor to use, or null if the default should be used.
        ioHandlerFactory - the IoHandlerFactory to use for creating new IoHandler instances that will handle the IO for the EventLoop.
        maxPendingTasks - the maximum number of pending tasks before new tasks will be rejected.
        rejectedHandler - the RejectedExecutionHandler to use.
      • MultithreadEventLoopGroup

        public MultithreadEventLoopGroup​(int nThreads,
                                         ThreadFactory threadFactory,
                                         IoHandlerFactory ioHandlerFactory,
                                         int maxPendingTasks,
                                         RejectedExecutionHandler rejectedHandler)
        Create a new instance.
        Parameters:
        nThreads - the number of threads that will be used by this instance.
        threadFactory - the ThreadFactory to use, or null if the default should be used.
        ioHandlerFactory - the IoHandlerFactory to use for creating new IoHandler instances that will handle the IO for the EventLoop.
        maxPendingTasks - the maximum number of pending tasks before new tasks will be rejected.
        rejectedHandler - the RejectedExecutionHandler to use.
      • MultithreadEventLoopGroup

        public MultithreadEventLoopGroup​(int nThreads,
                                         Executor executor,
                                         IoHandlerFactory ioHandlerFactory,
                                         int maxPendingTasks,
                                         RejectedExecutionHandler rejectedHandler,
                                         int maxTasksPerRun)
        Create a new instance.
        Parameters:
        nThreads - the number of threads that will be used by this instance.
        executor - the Executor to use, or null if the default should be used.
        ioHandlerFactory - the IoHandlerFactory to use for creating new IoHandler instances that will handle the IO for the EventLoop.
        maxPendingTasks - the maximum number of pending tasks before new tasks will be rejected.
        rejectedHandler - the RejectedExecutionHandler to use.
        maxTasksPerRun - the maximum number of tasks per EventLoop run that will be processed before trying to handle IO again.
      • MultithreadEventLoopGroup

        public MultithreadEventLoopGroup​(int nThreads,
                                         ThreadFactory threadFactory,
                                         IoHandlerFactory ioHandlerFactory,
                                         int maxPendingTasks,
                                         RejectedExecutionHandler rejectedHandler,
                                         int maxTasksPerRun)
        Create a new instance.
        Parameters:
        nThreads - the number of threads that will be used by this instance.
        threadFactory - the ThreadFactory to use, or null if the default should be used.
        ioHandlerFactory - the IoHandlerFactory to use for creating new IoHandler instances that will handle the IO for the EventLoop.
        maxPendingTasks - the maximum number of pending tasks before new tasks will be rejected.
        rejectedHandler - the RejectedExecutionHandler to use.
        maxTasksPerRun - the maximum number of tasks per EventLoop run that will be processed before trying to handle IO again.