public class AtomixThread extends Thread
The Atomix thread primarily serves to store a ThreadContext for the current thread.
The context is stored in a WeakReference in order to allow the thread to be garbage collected.
There is no ThreadContext associated with the thread when it is first created.
It is the responsibility of thread creators to set the thread context when appropriate.
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
AtomixThread(Runnable target) |
| Modifier and Type | Method and Description |
|---|---|
ThreadContext |
getContext()
Returns the thread context.
|
void |
setContext(ThreadContext context)
Sets the thread context.
|
activeCount, checkAccess, 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, yieldpublic AtomixThread(Runnable target)
public void setContext(ThreadContext context)
context - The thread context.public ThreadContext getContext()
ThreadContext or null if no context has been configured.Copyright © 2013–2017. All rights reserved.