Package io.hekate.network.netty
Class NettyUtils
- java.lang.Object
-
- io.hekate.network.netty.NettyUtils
-
public final class NettyUtils extends Object
Netty-related utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
runAtAllCost(io.netty.channel.EventLoop eventLoop, Runnable task)
Executes the task using the provided event loop or falls back toAsyncUtils.fallbackExecutor()
if event loop is alreadyshut down
.static Waiting
shutdown(io.netty.util.concurrent.EventExecutorGroup executor)
Shuts down
the specified executor with0
graceful shutdown period.
-
-
-
Method Detail
-
shutdown
public static Waiting shutdown(io.netty.util.concurrent.EventExecutorGroup executor)
Shuts down
the specified executor with0
graceful shutdown period.- Parameters:
executor
- Executor to shutdown (can benull
).- 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 toAsyncUtils.fallbackExecutor()
if event loop is alreadyshut down
.- Parameters:
eventLoop
- Event loop.task
- Task.
-
-