public class FastThreadLocalThread extends Thread
Thread
that provides fast access to FastThreadLocal
variables.Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
FastThreadLocalThread() |
FastThreadLocalThread(Runnable target) |
FastThreadLocalThread(Runnable target,
String name) |
FastThreadLocalThread(String name) |
FastThreadLocalThread(ThreadGroup group,
Runnable target) |
FastThreadLocalThread(ThreadGroup group,
Runnable target,
String name) |
FastThreadLocalThread(ThreadGroup group,
Runnable target,
String name,
long stackSize) |
FastThreadLocalThread(ThreadGroup group,
String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
permitBlockingCalls()
Query whether this thread is allowed to perform blocking calls or not.
|
void |
setThreadLocalMap(InternalThreadLocalMap threadLocalMap)
Sets the internal data structure that keeps the thread-local variables bound to this thread.
|
InternalThreadLocalMap |
threadLocalMap()
Returns the internal data structure that keeps the thread-local variables bound to this thread.
|
boolean |
willCleanupFastThreadLocals()
|
static boolean |
willCleanupFastThreadLocals(Thread thread)
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public FastThreadLocalThread()
public FastThreadLocalThread(Runnable target)
public FastThreadLocalThread(ThreadGroup group, Runnable target)
public FastThreadLocalThread(String name)
public FastThreadLocalThread(ThreadGroup group, String name)
public FastThreadLocalThread(ThreadGroup group, Runnable target, String name)
public FastThreadLocalThread(ThreadGroup group, Runnable target, String name, long stackSize)
public final InternalThreadLocalMap threadLocalMap()
public final void setThreadLocalMap(InternalThreadLocalMap threadLocalMap)
public boolean willCleanupFastThreadLocals()
public static boolean willCleanupFastThreadLocals(Thread thread)
public boolean permitBlockingCalls()
FastThreadLocalThread
s 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.
false
, unless overriden by a subclass.Copyright © 2008–2024 The Netty Project. All rights reserved.