com.jdon.controller.cache
Class LRUCache
java.lang.Object
com.jdon.controller.cache.LRUCache
- All Implemented Interfaces:
- Cache
public class LRUCache
- extends java.lang.Object
- implements Cache
the LRU Cache implemention.
default is OFBiz's UtilCache, we can replace it with better cache product.
cache parameters must be defined, and the configure file name must
be defined in container.xml too.
@author banq
|
Constructor Summary |
LRUCache(java.lang.String configFileName)
configFileName must be defined in container.xml |
|
Method Summary |
void |
clear()
|
boolean |
contain(java.lang.Object key)
|
java.lang.Object |
get(java.lang.Object key)
|
void |
put(java.lang.Object key,
java.lang.Object value)
|
void |
remove(java.lang.Object key)
|
long |
size()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LRUCache
public LRUCache(java.lang.String configFileName)
- configFileName must be defined in container.xml
- Parameters:
configFileName -
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get in interface Cache
put
public void put(java.lang.Object key,
java.lang.Object value)
- Specified by:
put in interface Cache
remove
public void remove(java.lang.Object key)
- Specified by:
remove in interface Cache
size
public long size()
- Specified by:
size in interface Cache
clear
public void clear()
- Specified by:
clear in interface Cache
contain
public boolean contain(java.lang.Object key)
- Specified by:
contain in interface Cache