The java.lang.InheritableThreadLocal 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.
Following is the declaration for java.lang.InheritableThreadLocal class −
public class InheritableThreadLocal<T> extends ThreadLocal<T>
|S.N.||Constructor & Description|
public class InheritableThreadLocal<T>extends ThreadLocal<T>
This is the Single Constructor.
|S.N.||Method & Description|
protected T childValue(T parentValue)
This method 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.
This class inherits methods from the following classes −