Package io.netty.util.internal
Class ThreadExecutorMap
- java.lang.Object
-
- io.netty.util.internal.ThreadExecutorMap
-
public final class ThreadExecutorMap extends java.lang.Object
Allow to retrieve theEventExecutor
for the callingThread
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Runnable
apply(java.lang.Runnable command, EventExecutor eventExecutor)
Decorate the givenRunnable
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution.static java.util.concurrent.Executor
apply(java.util.concurrent.Executor executor, EventExecutor eventExecutor)
Decorate the givenExecutor
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution.static java.util.concurrent.ThreadFactory
apply(java.util.concurrent.ThreadFactory threadFactory, EventExecutor eventExecutor)
Decorate the givenThreadFactory
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution.static EventExecutor
currentExecutor()
static EventExecutor
setCurrentExecutor(EventExecutor executor)
Set the currentEventExecutor
that is used by theThread
.
-
-
-
Method Detail
-
currentExecutor
public static EventExecutor currentExecutor()
-
setCurrentExecutor
public static EventExecutor setCurrentExecutor(EventExecutor executor)
Set the currentEventExecutor
that is used by theThread
.
-
apply
public static java.util.concurrent.Executor apply(java.util.concurrent.Executor executor, EventExecutor eventExecutor)
Decorate the givenExecutor
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution.
-
apply
public static java.lang.Runnable apply(java.lang.Runnable command, EventExecutor eventExecutor)
Decorate the givenRunnable
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution.
-
apply
public static java.util.concurrent.ThreadFactory apply(java.util.concurrent.ThreadFactory threadFactory, EventExecutor eventExecutor)
Decorate the givenThreadFactory
and ensurecurrentExecutor()
will returneventExecutor
when called from within theRunnable
during execution.
-
-