This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird - Locking and Data class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "URLyBird - Locking and Data class" Watch "URLyBird - Locking and Data class" New topic
Author

URLyBird - Locking and Data class

John G Snider
Greenhorn

Joined: Sep 21, 2006
Posts: 1
I have read the forum FAQ and I have questions about the combined entries:
Can't we synchronize the update() method and ignore the lock() methods?
Why do we have lock() methods in the Data class?

First of all the answer aligns with my own assumptions. Physical locking of RAF file (synchronization) and logical locking of records (some custom implementation usually done with HashMap).

My only question is can't there only ever be one Data object in the server? It seems I've seen in this forum that some people attempt to use multiple Data objects. Then what, a private static HashMap for logical locking?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URLyBird - Locking and Data class