Top Description Fields Constructors Methods
io.netty.util.internal

public final Class ThreadExecutorMap

extends Object
Class Inheritance
Imports
io.netty.util.concurrent.EventExecutor, .FastThreadLocal, java.util.concurrent.Executor, .ThreadFactory

Allow to retrieve the EventExecutor for the calling Thread.

Field Summary

Modifier and TypeField and Description
private static final FastThreadLocal<EventExecutor>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Executor
apply(final Executor executor, final EventExecutor eventExecutor)

Decorate the given Executor and ensure currentExecutor() will return eventExecutor when called from within the Runnable during execution.

public static Runnable
apply(final Runnable command, final EventExecutor eventExecutor)

Decorate the given Runnable and ensure currentExecutor() will return eventExecutor when called from within the Runnable during execution.

public static ThreadFactory
apply(final ThreadFactory threadFactory, final EventExecutor eventExecutor)

Decorate the given ThreadFactory and ensure currentExecutor() will return eventExecutor when called from within the Runnable during execution.

public static EventExecutor
currentExecutor()

Returns the current EventExecutor that uses the Thread, or null if none / unknown.

private static void
setCurrentEventExecutor(EventExecutor executor)

Set the current EventExecutor that is used by the Thread.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mappingsback to summary
private static final FastThreadLocal<EventExecutor> mappings

Constructor Detail

ThreadExecutorMapback to summary
private ThreadExecutorMap()

Method Detail

applyback to summary
public static Executor apply(final Executor executor, final EventExecutor eventExecutor)

Decorate the given Executor and ensure currentExecutor() will return eventExecutor when called from within the Runnable during execution.

applyback to summary
public static Runnable apply(final Runnable command, final EventExecutor eventExecutor)

Decorate the given Runnable and ensure currentExecutor() will return eventExecutor when called from within the Runnable during execution.

applyback to summary
public static ThreadFactory apply(final ThreadFactory threadFactory, final EventExecutor eventExecutor)

Decorate the given ThreadFactory and ensure currentExecutor() will return eventExecutor when called from within the Runnable during execution.

currentExecutorback to summary
public static EventExecutor currentExecutor()

Returns the current EventExecutor that uses the Thread, or null if none / unknown.

setCurrentEventExecutorback to summary
private static void setCurrentEventExecutor(EventExecutor executor)

Set the current EventExecutor that is used by the Thread.