com.arsdigita.cms.dispatcher
Class SimpleCache

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended bycom.arsdigita.cms.dispatcher.SimpleCache
All Implemented Interfaces:
Cloneable, Map, Serializable

public class SimpleCache
extends Hashtable

A basic implementation of the Cache interface.

Version:
$Revision: #5 $ $DateTime: 2004/04/07 16:07:11 $
Author:
Michael Pih (pihman@arsdigita.com)
See Also:
Serialized Form

Field Summary
static String versionId
           
 
Constructor Summary
SimpleCache()
           
SimpleCache(int initialCapacity)
           
SimpleCache(int initialCapacity, float loadFactor)
           
SimpleCache(Map map)
           
 
Method Summary
 void flush()
          Clears the cache.
 Object get(Object key)
          Lookup and fetch a cached object.
 Object put(Object key, Object value)
          Caches one object.
 Object remove(Object key)
          Removes one cached object.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, hashCode, isEmpty, keys, keySet, putAll, rehash, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

SimpleCache

public SimpleCache()

SimpleCache

public SimpleCache(int initialCapacity)

SimpleCache

public SimpleCache(int initialCapacity,
                   float loadFactor)

SimpleCache

public SimpleCache(Map map)
Method Detail

get

public Object get(Object key)
Lookup and fetch a cached object.

Parameters:
key - The object key
Returns:
The cached object, null if there is none

put

public Object put(Object key,
                  Object value)
Caches one object.

Parameters:
key - The object key
value - The object to be cached
Returns:
The cached object

remove

public Object remove(Object key)
Removes one cached object.

Parameters:
key - The object key
Returns:
The formerly-cached object

flush

public void flush()
Clears the cache.



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 19 2004:2352 UTC