Edwin, you are totally right about filtering. I am doing the B&S assignment hence the 48 hours does not apply to my design. But if one decides to delete one of the records then in my code logic I remove this record out of my map.
Alexander, you are totally right if we are running the code on a single processor. It will take about the same amount of time (we have to take into account the overhead for threading but its really small). The scheduler does indeed provide time slices for each thread (kind of some context switching between threads).
On the other hand if a multi processor machine was being used, then each piece of code could be running on a seperate processor hence that could improve the performance. But that I believe is out of scope for the project. I think it is best to write the code for a single processor machine.
Basically, I have also tried to come up with a solution where reading and writing takes place on the record level but has Alexander stated this seems to be currently not possible. If it was, I think someone might have already found such a solution on the forum. Plus I think it would make the code extremely complex. The only thing I am still scratching my head about is the "isLocked" method. I am wondering if there could be a way I could use it to improve my concurrency with the CRUD methods.
By the way Mohamed, I am doing the B&S which also requires us to book a contractor. Now we do need to use the update method for booking so we can write to the "owner" field (might be a different field for Urly assignment). But when it comes to the Actual booking logic (i.e. Contractor or Room already booked so cannot be booked again) I believe this should be implemented on the client side. I think it is best to keep the "Data" class, or its subsystems if you are using a Facade pattern, as generic as possible. Hence my methods just fulfill the requirements described in the given interface and not more. I will build a thick client that will then provide the bussiness logic.
[ May 03, 2008: Message edited by: Frederic Thierry ]