public class CacheStatsAtomic<Key,Value> extends CacheWrapper<Key,Value> implements CacheStats<Key,Value>
Constructor and Description |
---|
CacheStatsAtomic(Cache<Key,Value> cache) |
Modifier and Type | Method and Description |
---|---|
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 t)
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)
|
containsKey, isEmpty, keys, size
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
containsKey, isEmpty, keys, size
public Value get(Key key)
Cache
public Value put(Key key, Value t)
Cache
public boolean remove(Key key)
Cache
public void clear()
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>
Licenced under the Apache License, Version 2.0