|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openjena.atlas.lib.cache.CacheWrapper<Key,Value>
org.openjena.atlas.lib.cache.CacheStatsSimple<Key,Value>
public class CacheStatsSimple<Key,Value>
Collect statistics for a cache - this class is not thread safe (@see{CacheStatsAtomic})
| Constructor Summary | |
|---|---|
CacheStatsSimple(Cache<Key,Value> cache)
|
|
| Method Summary | |
|---|---|
void |
clear()
|
Value |
get(Key key)
Get from cache - or return null. |
long |
getCacheEjects()
|
long |
getCacheEntries()
|
long |
getCacheHits()
|
long |
getCacheMisses()
|
Value |
put(Key key,
Value value)
Insert into from cache and return old value (or null if none) |
boolean |
remove(Key key)
Remove from cache - return true if key referenced an entry |
void |
setDropHandler(ActionKeyValue<Key,Value> dropHandler)
Register a callback - called when an object is dropped from the cache (optional operation) |
| Methods inherited from class org.openjena.atlas.lib.cache.CacheWrapper |
|---|
containsKey, isEmpty, keys, size |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openjena.atlas.lib.Cache |
|---|
containsKey, isEmpty, keys, size |
| Constructor Detail |
|---|
public CacheStatsSimple(Cache<Key,Value> cache)
| Method Detail |
|---|
public Value get(Key key)
Cache
get in interface Cache<Key,Value>get in class CacheWrapper<Key,Value>
public Value put(Key key,
Value value)
Cache
put in interface Cache<Key,Value>put in class CacheWrapper<Key,Value>public boolean remove(Key key)
Cache
remove in interface Cache<Key,Value>remove in class CacheWrapper<Key,Value>public void clear()
clear in interface Cache<Key,Value>clear in class CacheWrapper<Key,Value>public void setDropHandler(ActionKeyValue<Key,Value> dropHandler)
Cache
setDropHandler in interface Cache<Key,Value>setDropHandler in class CacheWrapper<Key,Value>public final long getCacheEntries()
getCacheEntries in interface CacheStats<Key,Value>public final long getCacheHits()
getCacheHits in interface CacheStats<Key,Value>public final long getCacheMisses()
getCacheMisses in interface CacheStats<Key,Value>public final long getCacheEjects()
getCacheEjects in interface CacheStats<Key,Value>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||