|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.ThreadLocal<T>
com.groiss.ds.ThreadLocal2<T>
public class ThreadLocal2<T>
Same as java.lang.ThreadLocal, plus monitoring utility
| Constructor Summary | |
|---|---|
ThreadLocal2()
Creates a ThreadLocal variable. |
|
| Method Summary | |
|---|---|
T |
get()
Returns the value in the calling thread's copy of this ThreadLocal variable. |
Map<Thread,T> |
getThreads()
Returns the HashMap, keys are the threads |
protected T |
initialValue()
Returns the calling thread's initial value for this ThreadLocal variable. |
void |
remove()
|
void |
set(T value)
Sets the calling thread's instance of this ThreadLocal variable to the given value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadLocal2()
| Method Detail |
|---|
protected T initialValue()
initialValue in class ThreadLocal<T>public T get()
get in class ThreadLocal<T>public void set(T value)
set in class ThreadLocal<T>value - the value to be stored in the calling threads' copy of
this ThreadLocal.public Map<Thread,T> getThreads()
public void remove()
remove in class ThreadLocal<T>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||