java.lang
Class InheritableThreadLocal<T>
java.lang.Object
java.lang.ThreadLocal<T>
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InheritableThreadLocal
public InheritableThreadLocal()
- Creates a new inheritable thread local variable.
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>
Please submit a feedback, bug or feature