For the Java Development assignment, I am required to write some code for the lock and unlock method but I am baffled on how to do that. The basic problem is keeping check of which records are locked. However, I have thought of an idea. Is it possible to have a file containing information on which records are currently locked? This file will be updated continually in that when a record is not used anymore it is removed from the file and when a record is used it is stored in file so the operation will involved lot of writing/deletion. Is that a good approach?
posted 13 years ago
The basic problem is keeping check of which records are locked.
Yes, but also by whom they are locked.
Is it possible to have a file containing information on which records are currently locked?
Why in a file ? Locking is not a persistent information you need to keep between to starts of the application, is it ? Cheers, Phil.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads