|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.AbstractMap
java.util.HashMap
net.spy.util.TimeStampedHashMap
A HashMap that remembers when it was accessed. Good for caching and stuff like that.
| Constructor Summary | |
TimeStampedHashMap()
Get an instance of TimeStampedHashMap. |
|
| Method Summary | |
Object |
get(Object key)
Get an object from the map. |
long |
getGetAge()
How many milliseconds ago was the last get operation? |
long |
getHits()
Get the number of hits (number of requests for items that were actually there). |
long |
getLastGet()
Find out the last time this thing last had a Get. |
long |
getLastPut()
Find out the last time this thing last had a Put. |
long |
getMisses()
Get the number of misses (number of requests for items that were not actually there). |
long |
getNumPuts()
Get the total number of put() invocations. |
long |
getPutAge()
How many milliseconds ago was the last put operation? |
long |
getTimestamp()
Find out the last time this thing was used (put or get was called). |
long |
getUseAge()
How many milliseconds ago was the last put or get operation? |
long |
getWatermark()
Get the watermark (maximum number of objects seen at any one time). |
Object |
put(Object key,
Object value)
Put an object into the map. |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
| Constructor Detail |
public TimeStampedHashMap()
| Method Detail |
public Object get(Object key)
key - the object to get
public Object put(Object key,
Object value)
key - the key to storevalue - the value to store
public long getTimestamp()
public long getLastGet()
public long getLastPut()
public long getPutAge()
public long getGetAge()
public long getUseAge()
public long getHits()
public long getMisses()
public long getWatermark()
public long getNumPuts()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||