public class FastThreadLocalThread
extends java.lang.Thread
Thread
that provides fast access to FastThreadLocal
variables.构造器和说明 |
---|
FastThreadLocalThread() |
FastThreadLocalThread(java.lang.Runnable target) |
FastThreadLocalThread(java.lang.Runnable target,
java.lang.String name) |
FastThreadLocalThread(java.lang.String name) |
FastThreadLocalThread(java.lang.ThreadGroup group,
java.lang.Runnable target) |
FastThreadLocalThread(java.lang.ThreadGroup group,
java.lang.Runnable target,
java.lang.String name) |
FastThreadLocalThread(java.lang.ThreadGroup group,
java.lang.Runnable target,
java.lang.String name,
long stackSize) |
FastThreadLocalThread(java.lang.ThreadGroup group,
java.lang.String name) |
限定符和类型 | 方法和说明 |
---|---|
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(java.lang.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(java.lang.Runnable target)
public FastThreadLocalThread(java.lang.ThreadGroup group, java.lang.Runnable target)
public FastThreadLocalThread(java.lang.String name)
public FastThreadLocalThread(java.lang.ThreadGroup group, java.lang.String name)
public FastThreadLocalThread(java.lang.Runnable target, java.lang.String name)
public FastThreadLocalThread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name)
public FastThreadLocalThread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name, long stackSize)
public final InternalThreadLocalMap threadLocalMap()
public final void setThreadLocalMap(InternalThreadLocalMap threadLocalMap)
@UnstableApi public boolean willCleanupFastThreadLocals()
@UnstableApi public static boolean willCleanupFastThreadLocals(java.lang.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.