Sarah Raf wrote:Thanks for the Quick reply Ganesh.
Do I need to make my HashMap class as protected then?
How can you do this ? ( will you extends Hashmap bh any chance if so you do ,but for your requirement it doesnt makes sense for that effort ) .
In above scenario makes sure while you are retriving from DB , make all other threads in wait stage , else those threads will get the satle data or null values .
Hope it helps .
Concepts to use
Singleton , In memory Caching , Threading ...