Consider the scenario below:
- The application is multi-threaded and it has one static ArrayList used globally.
- The application has one thread that reconstruct the ArrayList entirely from data read from database from time to time.
- The application has N threads reading from this global ArrayList in parallel.
What is the best approach to thread-safe the multiple parallel reads and the occasional altering of the ArrayList object?