Class ThreadExecutorMap
java.lang.Object
io.netty.util.internal.ThreadExecutorMap
public final class ThreadExecutorMap
extends java.lang.Object
Allow to retrieve the
EventExecutor for the calling Thread.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 EventExecutorstatic EventExecutorsetCurrentExecutor(EventExecutor executor) Set the currentEventExecutorthat is used by theThread.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
mappings
-
-
Constructor Details
-
ThreadExecutorMap
private ThreadExecutorMap()
-
-
Method Details
-
currentExecutor
-
setCurrentExecutor
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
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.
-