- java.lang.Object
-
- io.netty5.util.internal.ThreadExecutorMap
-
public final class ThreadExecutorMap extends Object
Allow to retrieve theEventExecutorfor the callingThread.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Runnableapply(Runnable command, EventExecutor eventExecutor)Decorate the givenRunnableand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.static Executorapply(Executor executor, EventExecutor eventExecutor)Decorate the givenExecutorand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.static ThreadFactoryapply(ThreadFactory threadFactory, EventExecutor eventExecutor)Decorate the givenThreadFactoryand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.static EventExecutorcurrentExecutor()
-
-
-
Method Detail
-
currentExecutor
public static EventExecutor currentExecutor()
-
apply
public static Executor apply(Executor executor, EventExecutor eventExecutor)
Decorate the givenExecutorand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.
-
apply
public static Runnable apply(Runnable command, EventExecutor eventExecutor)
Decorate the givenRunnableand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.
-
apply
public static ThreadFactory apply(ThreadFactory threadFactory, EventExecutor eventExecutor)
Decorate the givenThreadFactoryand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.
-
-