Package io.netty.util.internal
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 Runnable
apply
(Runnable command, EventExecutor eventExecutor) Decorate the givenRunnable
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution.static Executor
apply
(Executor executor, EventExecutor eventExecutor) Decorate the givenExecutor
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution.static ThreadFactory
apply
(ThreadFactory threadFactory, EventExecutor eventExecutor) Decorate the givenThreadFactory
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution.static EventExecutor
static EventExecutor
setCurrentExecutor
(EventExecutor executor) Set the currentEventExecutor
that is used by theThread
.
-
Field Details
-
mappings
-
-
Constructor Details
-
ThreadExecutorMap
private ThreadExecutorMap()
-
-
Method Details
-
currentExecutor
-
setCurrentExecutor
Set the currentEventExecutor
that is used by theThread
. -
apply
Decorate the givenExecutor
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution. -
apply
Decorate the givenRunnable
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution. -
apply
Decorate the givenThreadFactory
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution.
-