API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. InheritableThreadLocal View Source
Author(s)
Josh Bloch and Doug Lea
Since
1.2
Version
1.22, 11/17/05
Serial
Hierarchy
 Object
      ThreadLocal
          InheritableThreadLocal
Implements
Subclasses
Description
public class InheritableThreadLocal
  This class extends ThreadLocal to provide inheritance of values from parent thread to child thread: when a child thread is created, the child receives initial values for all inheritable thread-local variables for which the parent has values.
See also:    ThreadLocal
Constructors
public InheritableThreadLocal ()
Methods
Hide/Show inherited methods
protected T childValue ( T parentValue) [Overrides ThreadLocal]
  Computes the child's initial value for this inheritable thread-local variable as a function of the parent's value at the time the child thread is created.
pack-privatestatic ThreadLocalMap createInheritedMap (ThreadLocalMap parentMap) [Inherited From ThreadLocal]
  Factory method to create map of inherited thread locals.
pack-private void createMap (Thread t, T firstValue) [Overrides ThreadLocal]
  Create the map associated with a ThreadLocal.
public T get () [Inherited From ThreadLocal]
  Returns the value in the current thread's copy of this thread-local variable.
pack-private ThreadLocalMap getMap (Thread t) [Overrides ThreadLocal]
  Get the map associated with a ThreadLocal.
protected T initialValue () [Inherited From ThreadLocal]
  Returns the current thread's "initial value" for this thread-local variable.
public void remove () [Inherited From ThreadLocal]
  Removes the current thread's value for this thread-local variable.
public void set ( T value) [Inherited From ThreadLocal]
  Sets the current thread's copy of this thread-local variable to the specified value.
Fields
Hide/Show inherited fields
Nested Classes
  ThreadLocal.ThreadLocalMap
ThreadLocalMap is a customized hash map suitable only for maintaining thread local values.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar