com.partnersoft.gadgets
Class HardCache

java.lang.Object
  extended by com.partnersoft.gadgets.HardCache

public abstract class HardCache
extends java.lang.Object

A basic hard reference caching implementation based on a hashed index.

Author:
Paul Reavis Copyright 1998 Partner Hardware, Inc.

Constructor Summary
HardCache()
          Create a hashed cache.
 
Method Summary
 void clear()
          Clears all items from the cache, so that they must be reloaded.
 java.lang.Object getCached(java.lang.Object index)
           
abstract  java.lang.Object getUncached(java.lang.Object index)
          Subclasses must implement this - it does the "real fetch" of the object, uncached, however appropriate for your use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HardCache

public HardCache()
Create a hashed cache.

Method Detail

getCached

public java.lang.Object getCached(java.lang.Object index)

getUncached

public abstract java.lang.Object getUncached(java.lang.Object index)
Subclasses must implement this - it does the "real fetch" of the object, uncached, however appropriate for your use. getCached() calls this method when it misses.


clear

public void clear()
Clears all items from the cache, so that they must be reloaded.