Build 1.0_r1(from source)

java.lang
Class InheritableThreadLocal<T>

java.lang.Object
  extended by java.lang.ThreadLocal<T>
      extended by java.lang.InheritableThreadLocal<T>

public class InheritableThreadLocal<T>
extends ThreadLocal<T>

A variable for which each thread has its own value; child threads will inherit the value at thread creation time.

See Also:
Thread, ThreadLocal

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.ThreadLocal
ThreadLocal.Values
 
Constructor Summary
InheritableThreadLocal()
          Creates a new inheritable thread local variable.
 
Method Summary
protected  T childValue(T parentValue)
          Creates a value for the child thread given the parent thread's value.
(package private)  ThreadLocal.Values initializeValues(Thread current)
          Creates Values instance for this thread and variable type.
(package private)  ThreadLocal.Values values(Thread current)
          Gets Values instance for this thread and variable type.
 
Methods inherited from class java.lang.ThreadLocal
get, initialValue, remove, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InheritableThreadLocal

public InheritableThreadLocal()
Creates a new inheritable thread local variable.

Method Detail

childValue

protected T childValue(T parentValue)
Creates a value for the child thread given the parent thread's value. Called from the parent thread when creating a child thread. The default implementation returns the parent thread's value.


values

ThreadLocal.Values values(Thread current)
Description copied from class: ThreadLocal
Gets Values instance for this thread and variable type.

Overrides:
values in class ThreadLocal<T>

initializeValues

ThreadLocal.Values initializeValues(Thread current)
Description copied from class: ThreadLocal
Creates Values instance for this thread and variable type.

Overrides:
initializeValues in class ThreadLocal<T>

Build 1.0_r1(from source)

Please submit a feedback, bug or feature