Package io.netty.util.internal
Class ThreadExecutorMap
- java.lang.Object
-
- io.netty.util.internal.ThreadExecutorMap
-
public final class ThreadExecutorMap extends java.lang.ObjectAllow to retrieve theEventExecutorfor the callingThread.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Runnableapply(java.lang.Runnable command, EventExecutor eventExecutor)Decorate the givenRunnableand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.static java.util.concurrent.Executorapply(java.util.concurrent.Executor executor, EventExecutor eventExecutor)Decorate the givenExecutorand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.static java.util.concurrent.ThreadFactoryapply(java.util.concurrent.ThreadFactory threadFactory, EventExecutor eventExecutor)Decorate the givenThreadFactoryand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.static EventExecutorcurrentExecutor()static EventExecutorsetCurrentExecutor(EventExecutor executor)Set the currentEventExecutorthat is used by theThread.
-
-
-
Method Detail
-
currentExecutor
public static EventExecutor currentExecutor()
-
setCurrentExecutor
public static EventExecutor setCurrentExecutor(EventExecutor executor)
Set the currentEventExecutorthat is used by theThread.
-
apply
public static java.util.concurrent.Executor apply(java.util.concurrent.Executor executor, EventExecutor eventExecutor)Decorate the givenExecutorand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.
-
apply
public static java.lang.Runnable apply(java.lang.Runnable command, EventExecutor eventExecutor)Decorate the givenRunnableand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.
-
apply
public static java.util.concurrent.ThreadFactory apply(java.util.concurrent.ThreadFactory threadFactory, EventExecutor eventExecutor)Decorate the givenThreadFactoryand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.
-
-