my dog learned polymorphism
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes (B&S) Ideas on Updating Cache 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) Ideas on Updating Cache" Watch "(B&S) Ideas on Updating Cache" New topic

(B&S) Ideas on Updating Cache

Saheed Adepoju
Ranch Hand

Joined: Jun 23, 2004
Posts: 267
Hi all
I have been wondering for a while how easy it would be to update the cache once an update has been done. I was tempted to send the data to be updated to a method that would retrive the recNo and then search for the record and update the object accordingly. My assumption is based on the following code:

However, i quickly notice, i have to hardcode the setters. I dont know if anyone id feeling me on this. I wouldnt mind an insight on how to accomplish this. Thanks all.

Saheed Adepoju<br />SCJP 1.4<br />SCJD (B&S..In progress)
Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
Good that I finally see code pieces which look on the similar lines I am working on.

One thing, I think the cache is a misnomer, just that the vector array (in my case), is a in memory replica of the file, which gets written to the disk once the object is modified.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11776

Hi Saheed,

Just a little hint: Why does your cache need to know what is in the String[] it is storing?

Regards, Andrew

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
I agree. Here's the link:
subject: (B&S) Ideas on Updating Cache
It's not a secret anymore!