public class

SimpleMRUCache

extends Object
implements Serializable
java.lang.Object
   ↳ org.hibernate.util.SimpleMRUCache

Class Overview

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.

Summary

Constants
int DEFAULT_STRONG_REF_COUNT
Public Constructors
SimpleMRUCache()
SimpleMRUCache(int strongReferenceCount)
Public Methods
synchronized void clear()
synchronized Object get(Object key)
synchronized Object put(Object key, Object value)
synchronized int size()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int DEFAULT_STRONG_REF_COUNT

Constant Value: 128 (0x00000080)

Public Constructors

public SimpleMRUCache ()

public SimpleMRUCache (int strongReferenceCount)

Public Methods

public synchronized void clear ()

public synchronized Object get (Object key)

public synchronized Object put (Object key, Object value)

public synchronized int size ()