File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mickey Mulligan
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic