|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.util.LongKeyHashMap<E>
public class LongKeyHashMap<E>
Cache with a clock replacement policy.
Null keys are not allowed. LruCache is synchronized.
Constructor Summary | |
---|---|
LongKeyHashMap()
Create the clock cache with a specific capacity. |
|
LongKeyHashMap(int initialCapacity)
Create the clock cache with a specific capacity. |
Method Summary | |
---|---|
void |
clear()
Clears the map |
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. |
E |
remove(long key)
Removes an item from the map |
int |
size()
Returns the current number of entries in the cache. |
java.util.Iterator<E> |
valueIterator()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LongKeyHashMap()
initialCapacity
- minimum capacity of the cachepublic LongKeyHashMap(int initialCapacity)
initialCapacity
- minimum capacity of the cacheMethod 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 E remove(long key)
key
- the key to remove
public java.util.Iterator<E> valueIterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |