jQuery in Action, 3rd edition
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S & Denny's: Design decisions (locking stuff really) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "B&S & Denny Watch "B&S & Denny New topic

B&S & Denny's: Design decisions (locking stuff really)

Mickey Mulligan

Joined: Feb 26, 2006
Posts: 20
I've seen how logical locking was implemented in Denny's DVD's, the project that came with the SCJD book. I'm looking to do something similar for my assignment (Bodgitt & Scarper), so I'll have a "LockingManager" class to handle locking and unlocking records. At the moment I've got (pseudocode):

I presume using a synchronized block to sort out the problem with threads slicing in is a good idea? Are there any other designs I should look at perhaps? I like the idea of keeping the locking seperate from File I/O so I want to keep it that way. But not if I'm going to lose marks for overuse of 'synchronized'!
I agree. Here's the link: http://aspose.com/file-tools
subject: B&S & Denny's: Design decisions (locking stuff really)
It's not a secret anymore!