Class NettyUtils


  • public final class NettyUtils
    extends Object
    Netty-related utilities.
    • Method Detail

      • shutdown

        public static Waiting shutdown​(io.netty.util.concurrent.EventExecutorGroup executor)
        Shuts down the specified executor with 0 graceful shutdown period.
        Parameters:
        executor - Executor to shutdown (can be null).
        Returns:
        Waiting.
      • runAtAllCost

        public static void runAtAllCost​(io.netty.channel.EventLoop eventLoop,
                                        Runnable task)
        Executes the task using the provided event loop or falls back to AsyncUtils.fallbackExecutor() if event loop is already shut down.
        Parameters:
        eventLoop - Event loop.
        task - Task.