Hi all, I created a locking mechanism where even a deleted record or the end of db could be locked. This ensures that the position for a later record creation is threadsafe locked. When locking a marked deleted (or empty position like end of db), a RecordNotFoundException is thrown, otherwise not. That means my create() looks like: searchFreePos() lockFreePos() and catch RecordNotFoundException writeRecToPos() unlockPos() ________________________________________________ In case that db is full, the end of db is locked
For simplicity, the recNo equals the returned lockcookie. Does this design makes sense to you or did I missed anything? Do you know someone who did it like this? Thanks for your value answers and thoughts [General Infos: I use 3tier design and an extra LockManagerClass]
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