Java ThreadLocal introduction
The Java ThreadLocal class is capable of keeping a single value internally per thread that accesses it.
That means, that if multiple threads share a Java ThreadLocal, each of them can set their own value inside the ThreadLocal without overwriting each other's values.
When getting the value again, each thread will get the latest value it has set on the ThreadLocal - and not any value set by other threads.

Java ThreadLocal set() and get()
Java ThreadLocal remove() method
Java ThreadLocal with initial value
Set value lazily on Java ThreadLocal
Using a Java ThreadLocal from within an thread pool
