public class FastThreadLocalThread extends Thread implements IFastThreadLocalThread
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
FastThreadLocalThread()
Creates a new thread supporting fast thread-local variables.
|
FastThreadLocalThread(Runnable target)
Creates a new thread supporting fast thread-local variables.
|
FastThreadLocalThread(Runnable target,
String name)
Creates a new thread supporting fast thread-local variables.
|
FastThreadLocalThread(String name)
Creates a new thread supporting fast thread-local variables.
|
FastThreadLocalThread(ThreadGroup group,
Runnable target)
Creates a new thread supporting fast thread-local variables.
|
FastThreadLocalThread(ThreadGroup group,
Runnable target,
String name)
Creates a new thread supporting fast thread-local variables.
|
FastThreadLocalThread(ThreadGroup group,
Runnable target,
String name,
long stackSize)
Creates a new thread supporting fast thread-local variables.
|
FastThreadLocalThread(ThreadGroup group,
String name)
Creates a new thread supporting fast thread-local variables.
|
Modifier and Type | Method and Description |
---|---|
Object |
getFastThreadLocal(int index)
Returns a fast thread-local variable that is stored at the given index.
|
void |
removeFastThreadLocal(int index)
Removes a fast thread-local variable that is stored at the given index.
|
void |
setFastThreadLocal(int index,
Object value)
Stores a fast thread-local variable at the given index.
|
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()
Thread()
public FastThreadLocalThread(Runnable target)
target
- the object whose run method is invoked when this thread is
started. If null, this classes run method does nothing.Thread(Runnable)
public FastThreadLocalThread(ThreadGroup group, Runnable target)
group
- the thread group. If null and there is a security manager, the
group is determined by SecurityManager.getThreadGroup(). If
there is not a security manager or
SecurityManager.getThreadGroup() returns null, the group is set
to the current thread's thread group.target
- the object whose run method is invoked when this thread is
started. If null, this classes run method does nothing.SecurityException
- if the current thread cannot create a thread in the
specified thread groupThread(ThreadGroup, Runnable)
public FastThreadLocalThread(String name)
name
- the name of the new thread.Thread(String)
public FastThreadLocalThread(ThreadGroup group, String name)
group
- the thread group. If null and there is a security manager, the
group is determined by SecurityManager.getThreadGroup(). If
there is not a security manager or
SecurityManager.getThreadGroup() returns null, the group is set
to the current thread's thread group.name
- the name of the new thread.SecurityException
- if the current thread cannot create a thread in the
specified thread groupThread(ThreadGroup, String)
public FastThreadLocalThread(Runnable target, String name)
target
- the object whose run method is invoked when this thread is
started. If null, this thread's run method is invoked.name
- the name of the new thread.Thread(Runnable, String)
public FastThreadLocalThread(ThreadGroup group, Runnable target, String name)
group
- the thread group. If null and there is a security manager, the
group is determined by SecurityManager.getThreadGroup(). If
there is not a security manager or
SecurityManager.getThreadGroup() returns null, the group is set
to the current thread's thread group.target
- the object whose run method is invoked when this thread is
started. If null, this thread's run method is invoked.name
- the name of the new thread.SecurityException
- if the current thread cannot create a thread in the
specified thread groupThread(ThreadGroup, Runnable, String)
public FastThreadLocalThread(ThreadGroup group, Runnable target, String name, long stackSize)
group
- the thread group. If null and there is a security manager,
the group is determined by SecurityManager.getThreadGroup().
If there is not a security manager or
SecurityManager.getThreadGroup() returns null, the group is
set to the current thread's thread group.target
- the object whose run method is invoked when this thread is
started. If null, this thread's run method is invoked.name
- the name of the new thread.stackSize
- the desired stack size for the new thread, or zero to
indicate that this parameter is to be ignored.SecurityException
- if the current thread cannot create a thread in the
specified thread groupThread(ThreadGroup, Runnable, String, long)
public Object getFastThreadLocal(int index)
IFastThreadLocalThread
getFastThreadLocal
in interface IFastThreadLocalThread
index
- the index the variable is stored atpublic void setFastThreadLocal(int index, Object value)
IFastThreadLocalThread
setFastThreadLocal
in interface IFastThreadLocalThread
index
- the index the variable is to be stored atvalue
- the fast thread-local variablepublic void removeFastThreadLocal(int index)
IFastThreadLocalThread
removeFastThreadLocal
in interface IFastThreadLocalThread
index
- the index the variable is stored atCopyright © 2017–2022 SNF4J.ORG. All rights reserved.