Class ThreadExecutorMap
java.lang.Object
io.netty.util.internal.ThreadExecutorMap
Allow to retrieve the
EventExecutor for the calling Thread.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 EventExecutorstatic EventExecutorsetCurrentExecutor(EventExecutor executor) Set the currentEventExecutorthat is used by theThread.
-
Field Details
-
mappings
-
-
Constructor Details
-
ThreadExecutorMap
private ThreadExecutorMap()
-
-
Method Details
-
currentExecutor
-
setCurrentExecutor
Set the currentEventExecutorthat is used by theThread. -
apply
Decorate the givenExecutorand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution. -
apply
Decorate the givenRunnableand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution. -
apply
Decorate the givenThreadFactoryand ensurecurrentExecutor()will returneventExecutorwhen called from within theRunnableduring execution.
-