• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forced to go to RAF inside lock method ?

 
Ronald Wouters
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have following dilemma for my lock method.
Currently I check against a deletedRecords set to make sure the record I am trying to lock was not deleted while waiting for the record number to be gone from my lockedRecords set. Something like this:

As some of you have pointed out on this forum, simply checking if the record has not been deleted is not enough. A RecordNotFoundException should also be thrown by the lock method if the record does not exist.
I am using a single RAF instance, not any kind of caching. So, I am thinking the only way to validate if the record to be locked (if not deleted) exists, is doing a physical read on the raf inside the lock method !
I would like to know if this physical read is really necessary or if the check against my deletedRecords set is enough validation for the lock method ?

Regards.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic