站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.3 正式版 API 英文文档

SimpleMRUCache (Hibernate API Documentation) - Hibernate 3.2.3 正式版 API 英文文档


org.hibernate.util
Class SimpleMRUCache

java.lang.Object
  extended byorg.hibernate.util.SimpleMRUCache
All Implemented Interfaces:
Serializable

public class SimpleMRUCache
extends Object
implements Serializable

Cache following a "Most Recently Used" (MRU) algorithm for maintaining a bounded in-memory size; the "Least Recently Used" (LRU) entry is the first available for removal from the cache.

This implementation uses a bounded MRU Map to limit the in-memory size of the cache. Thus the size of this cache never grows beyond the stated size.

Author:
Steve Ebersole
See Also:
Serialized Form

Field Summary
static int DEFAULT_STRONG_REF_COUNT
           
 
Constructor Summary
SimpleMRUCache()
           
SimpleMRUCache(int strongReferenceCount)
           
 
Method Summary
 void clear()
           
 Object get(Object key)
           
 Object put(Object key, Object value)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_STRONG_REF_COUNT

public static final int DEFAULT_STRONG_REF_COUNT
See Also:
Constant Field Values
Constructor Detail

SimpleMRUCache

public SimpleMRUCache()

SimpleMRUCache

public SimpleMRUCache(int strongReferenceCount)
Method Detail

get

public Object get(Object key)

put

public Object put(Object key,
                  Object value)

size

public int size()

clear

public void clear()