org.mentawai.cache
Class TimeoutCache

java.lang.Object
  extended by org.mentawai.cache.AbstractCache
      extended by org.mentawai.cache.TimeoutCache
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable, Cache

public class TimeoutCache
extends AbstractCache
implements java.lang.Runnable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mentawai.cache.AbstractCache
capacity, hits, LOAD, map, misses, name, startDate
 
Constructor Summary
TimeoutCache(java.lang.String name, int capacity, long timeout)
           
 
Method Summary
 void close()
           
protected  java.util.Map<java.lang.Object,java.lang.Object> createMap(int initialCapacity, float load)
           
 java.lang.Object get(java.lang.Object key)
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 java.lang.Object remove(java.lang.Object key)
           
 void run()
           
 
Methods inherited from class org.mentawai.cache.AbstractCache
clear, getSize, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeoutCache

public TimeoutCache(java.lang.String name,
                    int capacity,
                    long timeout)
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

close

public void close()

createMap

protected java.util.Map<java.lang.Object,java.lang.Object> createMap(int initialCapacity,
                                                                     float load)
Specified by:
createMap in class AbstractCache

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface Cache
Overrides:
remove in class AbstractCache

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface Cache
Overrides:
get in class AbstractCache

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface Cache
Overrides:
put in class AbstractCache


Copyright © 2005 Mentawai Team. All Rights Reserved.