All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class key.LatentCache

java.lang.Object
   |
   +----key.Atom
           |
           +----key.AnimatedAtom
                   |
                   +----key.Daemon
                           |
                           +----key.LatentCache

public final class LatentCache
extends Daemon
The LatentCache is the final memory cache that is outside the CachedAtom mechanism of locks. It is used to 'transparently' cache things that can be easily rebuilt from the available information on demand. This class is used, for instance, by a ShortcutCollection. As a ShortcutCollection stores redundant information - all those Trie's and Hashtables are irrelevant and often unrequired, when it creates the Trie and Hashtable, it also add's itself to this latentcache. Every 5 minutes the latent cache checks back with the linkedtrie to see if the trie or hashtable has been used within those five minutes. If it has not been used at any time within those 5 minutes, the LatentlyCached atom is called to deallocate itself as it sees fit. This class provides an efficient mechanism for this behaviour


Constructor Index

 o LatentCache()

Method Index

 o addToCache(LatentlyCached)
 o loadFrom(DataInput)
 o removeFromCache(LatentlyCached)
 o run()
 o stop()
 o writeTo(DataOutput)

Constructors

 o LatentCache
 public LatentCache()

Methods

 o removeFromCache
 public synchronized void removeFromCache(LatentlyCached lc)
 o addToCache
 public synchronized void addToCache(LatentlyCached lc)
 o stop
 public synchronized void stop()
Overrides:
stop in class AnimatedAtom
 o run
 public void run()
Overrides:
run in class AnimatedAtom
 o loadFrom
 public synchronized void loadFrom(DataInput from) throws IOException
Overrides:
loadFrom in class Atom
 o writeTo
 public synchronized void writeTo(DataOutput to) throws IOException
Overrides:
writeTo in class Atom

All Packages  Class Hierarchy  This Package  Previous  Next  Index