org.mentawai.cache
Class TimeoutCache

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

public class TimeoutCache
extends AbstractCache
implements 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(String name, int capacity, long timeout)
           
 
Method Summary
 void close()
           
protected  Map<Object,Object> createMap(int initialCapacity, float load)
           
 Object get(Object key)
           
 Object put(Object key, Object value)
           
 Object remove(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(String name,
                    int capacity,
                    long timeout)
Method Detail

run

public void run()
Specified by:
run in interface Runnable

close

public void close()

createMap

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

remove

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

get

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

put

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


Copyright © 2013. All Rights Reserved.