Class CopyOnInheritThreadLocal


  • public class CopyOnInheritThreadLocal
    extends java.lang.InheritableThreadLocal<java.util.HashMap<java.lang.String,​java.lang.String>>
    This class extends InheritableThreadLocal so that children threads get a copy of the parent's hashmap.
    Author:
    Ceki Gülcü
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.HashMap<java.lang.String,​java.lang.String> childValue​(java.util.HashMap<java.lang.String,​java.lang.String> parentValue)
      Child threads should get a copy of the parent's hashmap.
      • Methods inherited from class java.lang.ThreadLocal

        get, initialValue, remove, set, withInitial
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CopyOnInheritThreadLocal

        public CopyOnInheritThreadLocal()
    • Method Detail

      • childValue

        protected java.util.HashMap<java.lang.String,​java.lang.String> childValue​(java.util.HashMap<java.lang.String,​java.lang.String> parentValue)
        Child threads should get a copy of the parent's hashmap.
        Overrides:
        childValue in class java.lang.InheritableThreadLocal<java.util.HashMap<java.lang.String,​java.lang.String>>