|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.allcolor.yahp.converter.CThreadContext
public final class CThreadContext
This class is a context bound to a thread
Field Summary | |
---|---|
private static java.lang.ThreadLocal |
contextLocal
A thread context is thread bound |
private CMutex |
mutex
mutex for thread safety |
private java.util.Map |
valueMap
Contains attributes set in this context |
Constructor Summary | |
---|---|
CThreadContext()
|
Method Summary | |
---|---|
java.lang.Object |
get(java.lang.String key)
Get the value with the given key from this context |
static CThreadContext |
getInstance()
Return a thread context |
void |
set(java.lang.String key,
java.lang.Object value)
Set a value in this context |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.ThreadLocal contextLocal
private final java.util.Map valueMap
private final CMutex mutex
Constructor Detail |
---|
public CThreadContext()
Method Detail |
---|
public static final CThreadContext getInstance()
public final java.lang.Object get(java.lang.String key)
key
- the key to lookup
public final void set(java.lang.String key, java.lang.Object value)
key
- the key to save the value onvalue
- the value to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |