RSS start | index | login or register | find | edit
Online for 3201 days.




sticky snips:

2004-02-23-bug
2004-08-02-misc


no backlinks


2 active users:

unknown (2)

Recent edits:

Java
tsr
2008-01-22
Swing Explorer
SAP XI
UISpec4J
JIDE-OSS
bean-properties
DocBook
Visual Library
DonDo stick
by tsr, 3158 days ago

skizz.plus.com/mywiki/DonDo

IStore {
key Add(object);
object Get(key);
void Init(IStore prev);
void Flush();
}

When the CacheStore is initialised, it calls the FileStore's Init(IStore prev) method. The FileStore then deserialises all the objects it has stored in previous sessions, and plays them back into the cache (that is it calls prev.Add(obj). This means that the cache is now fully populated.

A CacheStore.Get will either return an object if it is in the cache, or delegate to the next IStore, in this case a FileStore, which returns null.

On Add, the CacheStore just adds the object to its local cache. But when Flush() is called it calls Add on the FileStore for each object it has cached, and all state is serialized to the file.



No attachments for this snip.
Upload / manage attachments!
  c'est un vanilla site