Class TrueThreadLocal<T>


  • public class TrueThreadLocal<T>
    extends java.lang.ThreadLocal<T>
    A ThreadLocal that is local to the current thread, rather than Strand. If the current strand is a thread, then this would behave no different than a ThreadLocal, but if it's a fiber, then the value is local to the underlying thread - not the fiber. IMPORTANT: This class is only useful in circumstances where a data structure is striped to reduce contention, not when the value needs to actually be associated with the thread in any way.
    • Constructor Summary

      Constructors 
      Constructor Description
      TrueThreadLocal()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T get()  
      void set​(T value)  
      • Methods inherited from class java.lang.ThreadLocal

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

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

      • TrueThreadLocal

        public TrueThreadLocal()
    • Method Detail

      • get

        public T get()
        Overrides:
        get in class java.lang.ThreadLocal<T>
      • set

        public void set​(T value)
        Overrides:
        set in class java.lang.ThreadLocal<T>