Java ThreadLocal is a class that provides thread-local variables, which are variables that have separate copies for each thread accessing them. Each thread accessing a ThreadLocal variable gets its own independent copy, which prevents synchronization issues when multiple threads access the variable simultaneously. Introduced in Java 1995 with Java 1.0, ThreadLocal is often used in multi-threaded applications to store context-specific information, such as user sessions or database connections.
https://docs.oracle.com/javase/8/docs/api/java/lang/ThreadLocal.html