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

public Class FastThreadLocalThread

extends Thread
Class Inheritance
Imports
io.netty5.util.internal.UnstableApi, io.netty5.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
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
pack-priv final void
setThreadLocalMap(InternalThreadLocalMap threadLocalMap)

Sets the internal data structure that keeps the thread-local variables bound to this thread.

pack-priv final InternalThreadLocalMap
threadLocalMap()

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:
activeCountcheckAccessclonecountStackFramescurrentThreaddumpStackenumerategetAllStackTracesgetContextClassLoadergetDefaultUncaughtExceptionHandlergetIdgetNamegetPrioritygetStackTracegetStategetThreadGroupgetUncaughtExceptionHandlerholdsLockinterruptinterruptedisAliveisDaemonisInterruptedisVirtualjoinjoinjoinjoinofPlatformofVirtualonSpinWaitresumerunsetContextClassLoadersetDaemonsetDefaultUncaughtExceptionHandlersetNamesetPrioritysetUncaughtExceptionHandlersleepsleepsleepstartstartVirtualThreadstopsuspendthreadIdtoStringyield

Field Detail

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

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

setThreadLocalMapback to summary
pack-priv final void setThreadLocalMap(InternalThreadLocalMap threadLocalMap)

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
pack-priv final InternalThreadLocalMap threadLocalMap()

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