org.equanda.util
Class BoundCache<KEY,VALUE>
java.lang.Object
org.equanda.util.BoundCache<KEY,VALUE>
- All Implemented Interfaces:
- Cache<KEY,VALUE>
public class BoundCache<KEY,VALUE>
- extends Object
- implements Cache<KEY,VALUE>
Simple cache which is bound to have a maximum number of cached objects.
A given method is called to remove items from cache.
- Author:
- Joachim Van der Auwera
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BoundCache
public BoundCache(int maxSize,
Cache.Loader<KEY,VALUE> l,
Cache.Purger<VALUE> p)
get
public VALUE get(KEY key)
- Specified by:
get
in interface Cache<KEY,VALUE>
put
public VALUE put(KEY key,
VALUE value)
- Specified by:
put
in interface Cache<KEY,VALUE>
clear
public void clear()
- Specified by:
clear
in interface Cache<KEY,VALUE>
Copyright © 2007-2009. All Rights Reserved.