edu.mit.ai.psg.utilities
Class InitializableThreadLocal
java.lang.Object
|
+--java.lang.ThreadLocal
|
+--edu.mit.ai.psg.utilities.InitializableThreadLocal
- public class InitializableThreadLocal
- extends ThreadLocal
Thread local which can be initialized, e.g., by creating thread;
useful when thread local value needs to inherit value from
creating thread.
|
Method Summary |
void |
initialize(Thread t,
Object value)
Initialize value for thread. |
protected Object |
initialValue()
gets value, removes key entry to save space, and returns value,
or null if none (ThreadLocal.initialValue() returns null) |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
InitializableThreadLocal
public InitializableThreadLocal()
initialize
public void initialize(Thread t,
Object value)
- Initialize value for thread. Typically, creating thread will call this
to initialize value for newly created thread before created thread
is started.
initialValue
protected Object initialValue()
- gets value, removes key entry to save space, and returns value,
or null if none (
ThreadLocal.initialValue() returns null)
- Overrides:
- initialValue in class ThreadLocal