How to set & get value in thread specific local?
Step 1:
Create a class like bellow:
Step 2:
Set thread specific value in that.
Like: ABCThreadLocal.set(10);
Step 3:
Get that value in any time during that thread.
Like: ABCThreadLocal.get();
Hureeeeeeeeeeee Ready to use Your Thread Local which persist Object’s ( Integer in this case ) value during the thread execution.