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

public Class FastThreadLocalThread

extends Thread
Class Inheritance
Imports
io.netty.util.internal.InternalThreadLocalMap, .UnstableApi, io.netty.util.internal.logging.InternalLogger, .InternalLoggerFactory

A special Thread that provides fast access to FastThreadLocal variables.

Field Summary

Modifier and TypeField and Description
private final boolean
private static final InternalLogger
private InternalThreadLocalMap
threadLocalMap

Deprecated as a consequence of InternalThreadLocalMap being deprecated.
Inherited from java.lang.Thread:
MAX_PRIORITYMIN_PRIORITYNORM_PRIORITY

Constructor Summary

AccessConstructor and Description
public
public
public
public
public
public
public
public
FastThreadLocalThread(ThreadGroup group, Runnable target, String name, long stackSize)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

false, unless overriden by a subclass.
permitBlockingCalls
()

Query whether this thread is allowed to perform blocking calls or not.

public final void
setThreadLocalMap(InternalThreadLocalMap threadLocalMap)

Deprecated as a consequence of InternalThreadLocalMap being deprecated.
Sets the internal data structure that keeps the thread-local variables bound to this thread.
public final InternalThreadLocalMap
threadLocalMap()

Deprecated as a consequence of InternalThreadLocalMap being deprecated.
Returns the internal data structure that keeps the thread-local variables bound to this thread.
public boolean
willCleanupFastThreadLocals()

Returns true if FastThreadLocal#removeAll() will be called once run() completes.

public static boolean
willCleanupFastThreadLocals(Thread thread)

Returns true if FastThreadLocal#removeAll() will be called once Thread#run() completes.

Inherited from java.lang.Thread:
activeCountcheckAccessclonecurrentThreaddumpStackenumerategetAllStackTracesgetContextClassLoadergetDefaultUncaughtExceptionHandlergetIdgetNamegetPrioritygetStackTracegetStategetThreadGroupgetUncaughtExceptionHandlerholdsLockinterruptinterruptedisAliveisDaemonisInterruptedisVirtualjoinjoinjoinjoinofPlatformofVirtualonSpinWaitresumerunsetContextClassLoadersetDaemonsetDefaultUncaughtExceptionHandlersetNamesetPrioritysetUncaughtExceptionHandlersleepsleepsleepstartstartVirtualThreadstopsuspendthreadIdtoStringyield

Field Detail

cleanupFastThreadLocalsback to summary
private final boolean cleanupFastThreadLocals
loggerback to summary
private static final InternalLogger logger
threadLocalMapback to summary
private InternalThreadLocalMap threadLocalMap

Deprecated

as a consequence of InternalThreadLocalMap being deprecated. See corresponding docs for further information.

Constructor Detail

FastThreadLocalThreadback to summary
public FastThreadLocalThread()
FastThreadLocalThreadback to summary
public FastThreadLocalThread(Runnable target)
FastThreadLocalThreadback to summary
public FastThreadLocalThread(ThreadGroup group, Runnable target)
FastThreadLocalThreadback to summary
public FastThreadLocalThread(String name)
FastThreadLocalThreadback to summary
public FastThreadLocalThread(ThreadGroup group, String name)
FastThreadLocalThreadback to summary
public FastThreadLocalThread(Runnable target, String name)
FastThreadLocalThreadback to summary
public FastThreadLocalThread(ThreadGroup group, Runnable target, String name)
FastThreadLocalThreadback to summary
public FastThreadLocalThread(ThreadGroup group, Runnable target, String name, long stackSize)

Method Detail

permitBlockingCallsback to summary
public boolean permitBlockingCalls()

Query whether this thread is allowed to perform blocking calls or not. FastThreadLocalThreads are often used in event-loops, where blocking calls are forbidden in order to prevent event-loop stalls, so this method returns false by default.

Subclasses of FastThreadLocalThread can override this method if they are not meant to be used for running event-loops.

Returns:boolean

false, unless overriden by a subclass.

setThreadLocalMapback to summary
public final void setThreadLocalMap(InternalThreadLocalMap threadLocalMap)

Deprecated

as a consequence of InternalThreadLocalMap being deprecated. See corresponding docs for further information.

Sets the internal data structure that keeps the thread-local variables bound to this thread. Note that this method is for internal use only, and thus is subject to change at any time.

threadLocalMapback to summary
public final InternalThreadLocalMap threadLocalMap()

Deprecated

as a consequence of InternalThreadLocalMap being deprecated. See corresponding docs for further information.

Returns the internal data structure that keeps the thread-local variables bound to this thread. Note that this method is for internal use only, and thus is subject to change at any time.

willCleanupFastThreadLocalsback to summary
public boolean willCleanupFastThreadLocals()

Returns true if FastThreadLocal#removeAll() will be called once run() completes.

Annotations
@UnstableApi
willCleanupFastThreadLocalsback to summary
public static boolean willCleanupFastThreadLocals(Thread thread)

Returns true if FastThreadLocal#removeAll() will be called once Thread#run() completes.

Annotations
@UnstableApi