com.jdon.cache
类 LRUCache

java.lang.Object
  继承者 com.jdon.cache.LRUCache
所有已实现的接口:
Startable, Cache

public class LRUCache
extends Object
implements Cache, Startable

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.

作者:
banq


构造方法摘要
LRUCache(String configFileName)
          configFileName must be defined in container.xml
 
方法摘要
 void clear()
           
 boolean contain(Object key)
           
 Object get(Object key)
           
 long getCacheHits()
           
 long getCacheMisses()
           
 Collection keySet()
           
 void put(Object key, Object value)
           
 void remove(Object key)
           
 long size()
           
 void start()
          Start this component.
 void stop()
          Stop this component.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

LRUCache

public LRUCache(String configFileName)
configFileName must be defined in container.xml

参数:
configFileName -
方法详细信息

get

public Object get(Object key)
指定者:
接口 Cache 中的 get

put

public void put(Object key,
                Object value)
指定者:
接口 Cache 中的 put

remove

public void remove(Object key)
指定者:
接口 Cache 中的 remove

size

public long size()
指定者:
接口 Cache 中的 size

clear

public void clear()
指定者:
接口 Cache 中的 clear

contain

public boolean contain(Object key)
指定者:
接口 Cache 中的 contain

keySet

public Collection keySet()
指定者:
接口 Cache 中的 keySet

stop

public void stop()
从接口 Startable 复制的描述
Stop this component.

指定者:
接口 Startable 中的 stop

start

public void start()
从接口 Startable 复制的描述
Start this component.

指定者:
接口 Startable 中的 start

getCacheHits

public long getCacheHits()
指定者:
接口 Cache 中的 getCacheHits

getCacheMisses

public long getCacheMisses()
指定者:
接口 Cache 中的 getCacheMisses


Copyright © 2013. All Rights Reserved.