|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.util.ClockCache<K,E>
public class ClockCache<K,E extends ClockCacheItem>
Cache with a clock replacement policy.
Null keys are not allowed. LruCache is synchronized.
| Constructor Summary | |
|---|---|
ClockCache(int initialCapacity)
Create the clock cache with a specific capacity. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the cache |
E |
get(K key)
Get an item from the cache and make it most recently used. |
E |
put(K key,
E value)
Puts a new item in the cache. |
ClockCacheItem |
remove(K key)
Removes an item from the cache |
int |
size()
Returns the current number of entries in the cache. |
java.util.Iterator<E> |
values()
Returns the values in the cache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClockCache(int initialCapacity)
initialCapacity - minimum capacity of the cache| Method Detail |
|---|
public int size()
public void clear()
public E get(K key)
key - key to lookup the item
public E put(K key,
E value)
key - key to store datavalue - value to be stored
public ClockCacheItem remove(K key)
key - the key to remove
public java.util.Iterator<E> values()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||