That is ok. It is actually a good chance to discuss details about the book.
By the way, no matter we use synchronized keywords or logical record locking, the code is considered as synchronized and
thread safe.
I am focusing on every line of the rent method. I am sure reserveDVD, getDVD and modifyDVD methods are fine as atomic thread safe code.
I don't have any questions regarding to these three methods.
When I read KB's book, KB recommended us to synchronize (no matter using synchronized keyword or other concurrency API) a whole block to make the code thread safe. For example, Vector class has synchronized methods. But when we use vector objects, we need to consider synchronizing the whole piece of code.
For example:
According to KB, vector's add method is synchronized. But we need to make sure the code after vector.add should also be synchronized too to make it thread safe.
So, KB book suggests to synchronize the whole block of code.
The same issue happens if with the rent method here in psuedo code