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