This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Howdy all - After a very long hiatus, I have started working on my assignment once more. Please comment on my BS design and code reached thus far on Data, CacheManager and RecordNotFoundException. I would really like to hear if any others have similar approaches for preloading cache etc. To give context to some of the code snippets below, a brief description of some relevant components is in order:
Each client gets its own Data object.
There's a LockManager singleton and a CacheManager singleton in the JVM.
The CacheManager's collection object (map) will be preloaded by the first data instance that gets to it. CacheManager's cache collection caches all the records available in the db file.
Data's read method reads "only" from the cache while update, delete and create methods update the cache.
RecordNotFoundException is thrown when a record doesn't exist in the cache or is a deleted record.
The readRecordFromCache method is synchronized while isRecordInCache is not.
The Record class encapsulates the data in the record and whether it's an active record.
Thank you for your time.
[ March 23, 2006: Message edited by: Arun Subramanian ] [ March 24, 2006: Message edited by: Arun Subramanian ]
Caching is fine but you may need to persist the data in filesystem at regular intervals(?) Note:According to the specs 'the data must continue to be manipulated for reports using another custom-written application'
B&S(2.3.1)<br />There are no stupid questions. Answers maybe
Joined: Oct 30, 2002
Caching is fine but you may need to persist the data in filesystem at regular intervals(?) Note:According to the specs 'the data must continue to be manipulated for reports using another custom-written application
My bad in probably not explaining it well. I try to keep the file and the cache in sync. I should have said:
Data's read method reads "only" from the cache while update, delete and create methods update the file and then update the cache. In other words, of the CRUD operations, R is a cache only operation while C, U and D first modify the file and then sync the cache.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: B&S v2.3.1 - Data, CacheManager and RecordNotFoundException