After we learned about advanced locks and read-write locks, we told our friend Bob that we now know how to protect shared resources with special locks that keep our application thread-safe and efficient.
Bob just completed a mission-critical class for his online store that maintains the store products' reviews, and he asked us for help.
He already implemented all the business logic. However, not knowing which locks to use, he left us blank methods getLockForXXXX() where we can provide his business logic methods with the correct locks.
Please complete the class in the appropriate sections to help Bob keep his class thread-safe and performant.